Re: pgsql: Fix behavior of exp() and power() for infinity inputs.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix behavior of exp() and power() for infinity inputs.
Date: 2020-06-15 04:10:52
Message-ID: 1095749.1592194252@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> On Sun, Jun 14, 2020 at 03:00:11PM +0000, Tom Lane wrote:
>> Also, add a bunch of test cases verifying that exp() and power()
>> actually do follow POSIX for Inf and NaN inputs. While this patch
>> should guarantee that exp() passes the tests, power() will not unless
>> the platform's pow(3) is fully POSIX-compliant. I already know that
>> gaur fails some of the tests, and I am suspicious that the Windows
>> animals will too; the extent of compliance of other old platforms
>> remains to be seen. We might choose to drop failing test cases, or
>> to work harder at overriding pow(3) for these cases, but first let's
>> see just how good or bad the situation is.

> The Windows servers don't actually cay anything here, but sidewinder
> and hoverfly complain, on top of gaur of course:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hoverfly&dt=2020-06-14%2015%3A05%3A33
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sidewinder&dt=2020-06-14%2018%3A45%3A28

Yeah, and presumably Noah's other AIX critters will fail too. I'm curious
to see what damselfly will say; that's the other old-ish platform we have
in the farm. Once that reports in, I'm intending to push the attached or
something close to it. This is more or less the same thing for pow() as
the current patch did for exp(): handle Inf cases manually and then
simplify the error checks in the normal path.

regards, tom lane

Attachment Content-Type Size
manage-infinities-in-pow-manually.patch text/x-diff 3.9 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-06-15 06:35:03 pgsql: Bump catversion for ACL changes on replication origin functions
Previous Message Michael Paquier 2020-06-15 03:42:59 Re: pgsql: Fix behavior of exp() and power() for infinity inputs.