Email list hosting service & mailing list manager


Re: reading NaNs Per Bothner 24 Oct 2005 21:11 UTC

Alan Watson wrote:

> However, I still think we need a read syntax. Suppose program A
> calculates a value and writes it to a file and program B reads the value
> from the file and uses it. Is is not useful for program A to be able to
> communicate to program B that it got a NaN? This would suggest we need a
> write syntax and a read syntax for NaNs. (Whether this syntax should
> specify and preserve the bit patterns is another argument.)

Well, it seems logical to generalize "+nan.0" to "+nan.NNNNN".
Whether NNNNN should be decimal or hex (or octal) is less obvious.
Hex seems more useful and natural, assuming it doesn't cause
lexing ambiguities.  I.e. is "+nan.FF" unambiguous?
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/