chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Omit warning about exact fractions when as


From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH] Omit warning about exact fractions when asked for an inexact value
Date: Fri, 23 Mar 2012 00:16:00 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

Peter Bex scripsit:

> According to the R7RS BNF, #e+inf.0 is actually valid numerical syntax,

Yes, you're right.  I shouldn't have said "syntax error".

> It's unclear to me whether (string->number "#e+inf.0") should
> return #f or raise an error.  The syntax is valid, but the question
> is nonsense: "give me an exact value of infinity".

In all my Schemes in which reading #e+inf.0 raises an error, using
string->number returns #f.  Only ones where #e+inf.0 returns +inf.0
do otherwise.

> But when you realize (eqv? +nan.0 +nan.0) is unspecified (section 6.1),

I wouldn't assume that's stable.

-- 
John Cowan              http://www.ccil.org/~cowan      address@hidden
Would your name perchance be surname Puppet, given name Sock?
                --Rick Moen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]