what does NaN mean out of printf?

John Nagle nagle at well.UUCP
Mon Jul 24 01:04:18 AEST 1989


      In IEEE Floating Point, there is a value for the exponent that
indicates that the mantissa, rather than representing a numeric value,
represents a special code.  At least the following codes are defined:

	positive infinity
	negative infinity
	not a number

Uninitialized variables should be initialized to the "not a number"
value, and some implementations do this.  One gets positive infinity
if you divide a positive number by zero, and negative infinity if
you divide a negative number by zero.  Try generating these values 
and see what happens when you print them on your implementation.

					John Nagle



More information about the Comp.unix.wizards mailing list