what does NaN mean out of printf?

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Jul 19 17:14:15 AEST 1989


In article <20283 at adm.BRL.MIL> Leisner.Henr at xerox.com (Marty) writes:
>What does NaN mean out of printf?

Please direct C language questions to the C newsgroup, not a UNIX group.

NaN stands for "Not a Number".  In IEEE Std 754/854 floating-point
arithmetic, there are a set of bit combinations reserved for representing
non-numbers, as well as values for positive and negative infinity.
If you haven't arranged your computation correctly, you can easily find
one of these odd creatures lurking in a floating-point variable instead
of a valid number.



More information about the Comp.lang.c mailing list