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

From: Marcin 'Qrczak' Kowalczyk <qrczak>
Date: Sun Oct 8 15:21:32 2006

Paul Schlie <schlie_at_comcast.net> writes:

>> There are naturally three disjoint cases:
>> * finite?
>> * infinite?
>> * nan?
>
> as (fl< +nan.0 +inf.0) => #f, and considered a valid numerical
> comparison, it would appear they are not numerically disjoint?

They are disjoint in the sense that every real number satisfies
exactly one of these predicates.

> [although the draft is seemingly silent on (fl<= +nan.0 +inf.0)]

IEEE arithmetic says #f, and I consider bropken any language which
tries to do otherwise.

> and why indefinite? may be a more appropriate name than infinite?

You can use (not (finite? x)). No need for a separate predicate.

Strictly speaking any two of the three predicates would be sufficient,
but providing all three is convenient.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak_at_knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
Received on Sun Oct 08 2006 - 15:21:23 UTC

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