[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading NaNs

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.

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
per@xxxxxxxxxxx   http://per.bothner.com/