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

From: Paul Schlie <schlie>
Date: Sun Oct 8 11:25:57 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].
Received on Sun Oct 08 2006 - 11:25:14 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC