On 10/27/2020 7:17 AM, airplanemath via Cygwin wrote:
Compiling and running the attached program with the command line below
produces the output below:



$ gcc -O0 -Og test_sqrt.c -o test_sqrt && ./test_sqrt
Long double: -inf -inf
Double:      -inf -nan
Float:       -inf -nan

I suspect the behavior for long double should be the same as for double
and float (sqrt(-inf) = nan), but I'm not sure where to change that.
I'm running a snapshot of Cygwin 3.2.0, if that's important.

This is again a bug in the mingw-w64 math code that was imported into Cygwin. I'll send a fix to the cygwin-patches list.

Ken
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to