[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*: "John.Cowan" <jcowan@xxxxxxxxxxxxxxxxx>*Subject*: Re: +nan.0 problems*From*: bear <bear@xxxxxxxxx>*Date*: Sun, 23 Oct 2005 23:04:28 -0700 (PDT)*Cc*: Aubrey Jaffer <agj@xxxxxxxxxxxx>, srfi-77@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <20051023155746.GB7728@NYCMJCOWA2>*References*: <20051021145326.816C11B77BB@xxxxxxxxxxxxxxxxxxxxx> <20051021155906.GC16464@NYCMJCOWA2> <Pine.LNX.4.58.0510210910130.18969@xxxxxxxxxxxxxx> <20051022020312.GB5632@NYCMJCOWA2> <20051022163037.D2AFB1B77BB@xxxxxxxxxxxxxxxxxxxxx> <20051023155746.GB7728@NYCMJCOWA2>

On Sun, 23 Oct 2005, John.Cowan wrote: >Aubrey Jaffer scripsit: > >> SRFI-77 states: >> >> This SRFI regards +nan.0 as a real number whose value is so >> indeterminate that it might represent any real number within the >> closed interval [-inf.0,+inf.0]. > >Thanks for pointing this out. The SRFI is of course wrong: the paradigm >case of +nan.0 is (/ 0.0 0.0), and the value of this is not any of the >real numbers. Ehhh. 0.0 is such a beast anyway.... An 0.0 encountered in source code is zero, but one "encountered in the wild" as a result of computation is frequently just an underflow - a real, nonzero number that is nevertheless too small to be represented in whatever format the implementation uses. If both your 0.0's happen to be underflows in this sense, then the actual value of the above expression is in fact a "real number whose value cannot be determined." But if, as in source, both are truly zeros, then it's an error operation and you have a clear case for a NaN. Anyway, in a programming language you have to make a decision about what the expression returns, because if you're using IEEE floats, you can't tell the difference between an underflow and a zero. Bear

**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:*John.Cowan

- Prev by Date:
**Re: arithmetic issues** - Next by Date:
**Re: arithmetic issues** - Previous by thread:
**Re: +nan.0 problems** - Next by thread:
**+nan.0 contradiction** - Index(es):