Re: power() function in Windows: "value out of range: underflow" - Mailing list pgsql-bugs

From Euler Taveira
Subject Re: power() function in Windows: "value out of range: underflow"
Date
Msg-id CAHE3wgh5HhBiZJonWuJo7oXS41v6T5nYnQ1TVop0TK9T0AzDfw@mail.gmail.com
Whole thread Raw
In response to Re: power() function in Windows: "value out of range: underflow"  (David Rowley <david.rowley@2ndquadrant.com>)
Responses RE: power() function in Windows: "value out of range: underflow"
RE: power() function in Windows: "value out of range: underflow"
List pgsql-bugs
2018-04-11 0:13 GMT-03:00 David Rowley <david.rowley@2ndquadrant.com>:
> I can recreate this when building with MSVC 2012. I confirm that I see
> the same as you. Microsoft are setting errno to EDOM in the above 3
> cases, where in Linux the result is still NaN, just the errno is not
> set.
>
FWIW, I tested in MSVC 2017 (15.6.4) and it worked like expected.
Looking at [1], it seems there could be nasty bugs when using math
functions in MSVC < 2013 (or 2015). I don't have some older MSVC here
to try /fp:OPTIONHERE [2] to see if it makes any difference.


[1] https://docs.microsoft.com/en-us/cpp/porting/floating-point-migration-issues
[2] https://msdn.microsoft.com/pt-br/library/e7s85ffb.aspx


-- 
   Euler Taveira                                   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #15105: OpenTransientFile() should be paired withCloseTransientFile() rather than close()
Next
From: Huong Dangminh
Date:
Subject: RE: power() function in Windows: "value out of range: underflow"