Re: Windows regress fails (latest HEAD)

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows regress fails (latest HEAD)
Date: 2020-06-11 14:57:56
Message-ID: 87y2ot663c.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Ranier" == Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> writes:

Ranier> Hi,
Ranier> Latest HEAD, fails with windows regress tests.

Ranier> three | f1 | sqrt_f1
Ranier> -------+----------------------+-----------------------
Ranier> | 1004.3 | 31.6906926399535
Ranier> - | 1.2345678901234e+200 | 1.11111110611109e+100
Ranier> + | 1.2345678901234e+200 | 1.11111110611108e+100
Ranier> | 1.2345678901234e-200 | 1.11111110611109e-100
Ranier> (3 rows)

This error is a surprisingly large one. Normally one expects sqrt to be
accurate to within half an ulp, i.e. accurate to the limits of the
format, though the regression test avoids actually making this
assumption. But in this case the true output we expect is:

1.111111106111085536...e+100

for which the closest representable float8 is

1.111111106111085583...e+100 (= 0x1.451DCD2E3ACAFp+332)

which should round (since we're doing this test with
extra_float_digits=0) to

1.11111110611109e+100

The nearest value that would round to 1.11111110611108e+100 would be
1.1111111061110848e+100 (= 0x1.451DCD2E3ACABp+332), which is a
difference of not less than 4 ulps from the expected value.

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2020-06-11 15:27:57 Re: Recording test runtimes with the buildfarm
Previous Message Andrew Dunstan 2020-06-11 14:55:49 Re: Recording test runtimes with the buildfarm