NaN fixes in pow, powf, modf, modff
Keith Packard
keithp@keithp.com
Thu Mar 26 00:18:18 GMT 2020
The first patch makes modf set *iptr to qnan when provided an snan
parameter, which wasn't happening on ARM softfp because GCC elided the
* 1.0 operation.
The second patch cleans up modf/modff by not re-converting the float
to bits before extracting the sign bit.
The third patch makes pow return qnan instead of 1.0 when the
parameter is snan.
These functions now match glibc for all of my tests, which were
derived from the IEEE requirements.
More information about the Newlib
mailing list