sqrtl behavior inconsistent with sqrt and sqrtf
airplanemath
airplanemath@aol.com
Tue Oct 27 11:17:01 GMT 2020
Compiling and running the attached program with the command line below
produces the output below:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_sqrt.c
URL: <https://cygwin.com/pipermail/cygwin/attachments/20201027/0d4701a0/attachment.c>
-------------- next part --------------
$ 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.
More information about the Cygwin
mailing list