Possible issue with pow(-1, NaN) in newlib's libm

Corinna Vinschen vinschen@redhat.com
Fri Feb 14 09:16:00 GMT 2020


Hi Nicolas,

On Feb 14 09:11, Nicolas Brunie wrote:
> Hello all, 
> 
> First time sender, excuse me if I misspoke. 
> 
> I think I may have encountered a bug in the implementation of pow: 
> pow(-1.0, NaN) returns 1.0 when it should return NaN. 
> Because ix is used to check input vs 1.0 rather than hx, -1.0 is mistaken for 1.0 

You are right, thanks for catching!  I pushed your patch.

Next time, please send the patch in `git format-patch' format,
that's easier to apply :)


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20200214/942f52a2/attachment.sig>


More information about the Newlib mailing list