Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pacbell!well!nagle From: nagle@well.UUCP (John Nagle) Newsgroups: comp.unix.wizards Subject: Re: what does NaN mean out of printf? Message-ID: <12831@well.UUCP> Date: 23 Jul 89 15:04:18 GMT References: <20283@adm.BRL.MIL> <588@amms4.UUCP> <573@mmlai.UUCP> Reply-To: nagle@well.UUCP (John Nagle) Lines: 16 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