[r6rs-discuss] The definition of flonum is in the wrong place

Paul Schlie schlie at comcast.net
Sun Oct 8 11:25:14 EDT 2006


> John Cowan wrote:
>>
>> Aubrey Jaffer scripsit:
>> ...
>>   ..., finite? tests if it is not an infinity and not a NaN,
>> infinite? tests if it is an infinity or NaN, nan? tests if it is a NaN.
>
> This seems to be a very unlikely interpretation.  NaNs are not infinities.

they may certainly be ...

  http://en.wikipedia.org/wiki/NaN

personally, it seems clear that as NaN may represent any value (inclusive
of a set of values having either ambiguous signs and/or magnitudes) not
otherwise representable within a given representation; NaN is simultaneously
both potentially, although not certainly, both finite? and infinite?

thereby is seems most useful to define:

finite?   :: being certainly neither infinite? or NaN?

infinite? :: being possibly infinite, inclusive of NaN :: (not finite?)

 [thereby possibly better named: indefinite? vs. infinite?]

as a predicate to test for an infinity regardless of it's sign seems of
little value if not inclusive of the possibility of an NaN representing a
set of values which may have an infinite magnitude, although ambiguous sign
[i.e. (flsqrt -Inf) => NaN; or (/ 0) => NaN for the sake of argument as
halting execution in the presence of a numerical ambiguity doesn't seem
particularly useful, and thereby the purpose and utility of NaN's].





More information about the r6rs-discuss mailing list