Re: power() function in Windows: "value out of range: underflow"

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Huong Dangminh <huo-dangminh(at)ys(dot)jp(dot)nec(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Akio Iwaasa <aki-iwaasa(at)vt(dot)jp(dot)nec(dot)com>
Subject: Re: power() function in Windows: "value out of range: underflow"
Date: 2018-04-29 21:59:06
Message-ID: CAKJS1f_crLhE5OBKwGOZZQ-gWdJ9=SQ1u+fOzSb+WQQzChCOeA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 30 April 2018 at 07:24, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Pushed. I'd mainly note that you need to update all the variant float8
> expected-files, not just the primary one. (Sometimes this requires a
> bit of guesswork, but here we're expecting all platforms to produce
> the same result. The buildfarm should tell us if I got it wrong.)

gaur does not seem happy with this. I get the impression that pow(1,
NaN) and pow(NaN, 0) on that machine must be returning NaN and setting
errno to EDOM, and now that we're only using that code path when both
are are non-NaN we no longer hit the special case which does result =
1;

I wonder if it's better just to hard code these two cases before even
calling the pow() function.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-04-29 22:10:17 Re: power() function in Windows: "value out of range: underflow"
Previous Message Tom Lane 2018-04-29 21:19:00 Re: power() function in Windows: "value out of range: underflow"

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-04-29 22:10:17 Re: power() function in Windows: "value out of range: underflow"
Previous Message Tom Lane 2018-04-29 21:19:00 Re: power() function in Windows: "value out of range: underflow"