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

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.

*To*: tb@xxxxxxxxxx*Subject*: Re: +nan.0 problems*From*: Aubrey Jaffer <agj@xxxxxxxxxxxx>*Date*: Sun, 23 Oct 2005 12:28:05 -0400 (EDT)*Cc*: qrczak@xxxxxxxxxx, srfi-77@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <87y84lvyx1.fsf@xxxxxxxxxxxxxxxxx> (message from Thomas Bushnell BSG on Sat, 22 Oct 2005 17:51:06 -0700)*References*: <20051021145326.816C11B77BB@xxxxxxxxxxxxxxxxxxxxx> <20051021155906.GC16464@NYCMJCOWA2> <Pine.LNX.4.58.0510210910130.18969@xxxxxxxxxxxxxx> <20051022020312.GB5632@NYCMJCOWA2> <20051022163037.D2AFB1B77BB@xxxxxxxxxxxxxxxxxxxxx> <87zmp1tmd9.fsf@xxxxxxxxxxxxx> <20051022233336.236AC1B77BB@xxxxxxxxxxxxxxxxxxxxx> <87y84lvyx1.fsf@xxxxxxxxxxxxxxxxx>

| From: Thomas Bushnell BSG <tb@xxxxxxxxxx> | Date: Sat, 22 Oct 2005 17:51:06 -0700 | | Aubrey Jaffer <agj@xxxxxxxxxxxx> writes: | | > | From: "Marcin 'Qrczak' Kowalczyk" <qrczak@xxxxxxxxxx> | > | Date: Sat, 22 Oct 2005 20:52:50 +0200 | > | | > | Aubrey Jaffer <agj@xxxxxxxxxxxx> writes: | > | | > | > The total order of the reals is a crucial property for many | > | > applications. Any subset of the reals has a total order. | > | > The reals with +inf.0 and -inf.0 have a total order. | > | > | > | > But the reals with +inf.0, -inf.0, and +nan.0 do not have a total | > | > order [because (<= 5 +nan.0) and (>= 5 +nan.0) would both be false]. | > | | > | It is well known that the default order on the floating point | > | approximation of reals is not total. The floating-point approximations to the reals do not include NaN. (which real number would it be approximating?) | > From Wikipedia, the free encyclopedia. | > <http://en.wikipedia.org/wiki/Total_order> | > | > In mathematics, a total order, linear order or simple order on a set | > X is any binary relation on X that is antisymmetric, transitive, and | > total. This means that, if we denote the relation by <=, the | > following statements hold for all a, b and c in X: | > | > if a <= b and b <= a then a = b (antisymmetry) | > if a <= b and b <= c then a <= c (transitivity) | > a <= b or b <= a (totalness) | > | > Which condition does it violate? | | Totalness (as Marcin said). NaN comparisons (other than | not-equals) always evaluate false. My point exactly! NaN violates totalness. Thus it is not a real number. Having (real? +nan.0) ==> #f and +nan.0 be an illegal argument to >, <, <=, and >= is compatible with IEEE-754. Just because IEEE-754 defines a behavior for comparisons with NaN doesn't mean Scheme must redefine <, ... so that it accepts non-real arguments. Scheme already has lots of non-real numbers which are illegal arguments to >: (> 5 5.+3.i)

**Follow-Ups**:**Re: +nan.0 problems***From:*Thomas Bushnell BSG

**References**:**arithmetic issues***From:*Aubrey Jaffer

**Re: arithmetic issues***From:*John.Cowan

**Re: arithmetic issues***From:*bear

**Re: arithmetic issues***From:*John.Cowan

**+nan.0 problems***From:*Aubrey Jaffer

**Re: +nan.0 problems***From:*Marcin 'Qrczak' Kowalczyk

**Re: +nan.0 problems***From:*Aubrey Jaffer

**Re: +nan.0 problems***From:*Thomas Bushnell BSG

- Prev by Date:
**Re: multiplicative inverse of 0.0** - Next by Date:
**Re: multiplicative inverse of 0.0** - Previous by thread:
**Re: +nan.0 problems** - Next by thread:
**Re: +nan.0 problems** - Index(es):