Charles R Harris wrote:
>
>     #include <math.h>
>     #include <stdio.h>
>
>     int main() {
>        double nan = sqrt(-1);
>        printf("%f\n", nan);
>        printf("%i\n", bool(nan));
>        return 0;
>     }
>
>     $ ./nan
>     nan
>     1
>
>
> So resolved, it is True.
Unless specified in the ISO C standard, I'd say this is system and 
compiler dependent.

Should NumPy rely on a specific binary representation of NaN?

A related issue is the boolean value of Inf and -Inf.

Sturla Molden
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to