<OT> newlib: pow function can produce incorrect results.
Fri Apr 20 01:24:00 GMT 2007
> I do agree that
> -1.0 to either +-infinity should be a nan, but then
> using that same logic why is -1.1 to infinity and 0.9
> to minus infinity equal to infinity and not nan?
> Personally I don't really care which way it's done. I
> just would like things to be consistent.
pow() since the very beginning treats negative integral values different
from other negative values, so you can't make them totally consistent.
Maybe you should stick to Fortran or BASIC.
pow(0.9, -Inf) clearly must produce Inf, same as 1/pow(0.9, Inf).
pow(-1.1, Inf) should be NaN, but again, newlib doesn't generally go
beyond minimum C90 support. As newlib doesn't go very far in the
direction of C99 or IEEE754 support, it is out of the realm of cygwin.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin