]> granicus.if.org Git - postgresql/commit
Rethink how to test the hyperbolic functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Mar 2019 22:13:38 +0000 (18:13 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Mar 2019 22:13:45 +0000 (18:13 -0400)
commitc6f153dcfebccf7a0d92290037793c656f1caef5
tree949c91b33c419ce9417c4c076b45608148997d3a
parentc6c9474aafa4de357ae424cd18b69e8bf7a4babe
Rethink how to test the hyperbolic functions.

The initial commit tried to test them on trivial cases such as 0,
reasoning that we shouldn't hit any portability issues that way.
The buildfarm immediately proved that hope ill-founded, and anyway
it's not a great testing scheme because it doesn't prove that we're
even calling the right library function for each SQL function.

Instead, let's test them at inputs such as 1 (or something within
the valid range, as needed), so that each function should produce
a different output.

As committed, this is just about certain to show portability
failures, because it's very unlikely that every platform computes
these functions the same as mine down to the last bit.  However,
I want to put it through a buildfarm cycle this way, so that
we can see how big the variations are.  The plan is to add
"set extra_float_digits = -1", or whatever we need in order to
hide the variations; but first we need data.

Discussion: https://postgr.es/m/E1h3nUY-0000sM-Vf@gemulon.postgresql.org
src/test/regress/expected/float8.out
src/test/regress/sql/float8.sql