On Sat, 2009-01-17 at 09:19 -0800, Michele Simionato wrote:
> I read in the R6RS document:
> 
> """
> Some Scheme implementations, specifically those that follow the IEEE
> floating-point standards, distinguish special number objects called
> positive infinity, negative infinity, and NaN.
> """
> 
> What about Ikarus? In Python I have three constants ieee.PINF,
> ieee.MIN, ieee.NAN,
> I guess Ikarus has three equivalent objects.

R6RS 4.2.8 says:
"The literals +inf.0 and -inf.0 represent positive and negative
infinity, respectively. The +nan.0 literal represents the NaN that is
the result of (/ 0.0 0.0), and may represent other NaNs as well."

-nan.0 is also allowed by the lexical syntax, and 3.5 says: 
"A NaN is regarded as an inexact real (but not rational) number object
so indeterminate that it might represent any real number, including
positive or negative infinity, and might even be greater than positive
infinity or less than negative infinity."

>  Are there caveats to be
> aware of?

I don't know.  This is one area I'm totally unfamiliar with.

3.4 says:
"[R6RS] recommends, but does not require, that the IEEE floating-point
standards be followed by implementations that use floating-point
representations, and that implementations using other representations
should match or exceed the precision achievable using these
floating-point standards."

I've heard a few people criticize R6RS's numerics, but since I don't
understand the arguments, I have no idea how valid the criticisms are or
what they imply.

You should ask on comp.lang.scheme.

-- 
: Derick
----------------------------------------------------------------

Reply via email to