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

Re: [Scheme-reports] Strong win later reversed: Real numbers have imaginary part #e0



leppie scripsit:

> > R6RS and R7RS-draft-8 require that (eqv? +0.0 -0.0) => #f
> 
> R6RS says eqv? should behave like =.

Actually not.  For one thing, 2.0 and 2 have been different in
the sense of `eqv?` ever since R3RS.

But what's relevant here is all that blibberty-blibber in the R6RS
definition of `eqv?` about being indistinguishable by any finite
composition of Scheme's standard arithmetic procedures.  In particular,
(/ 0.0) is +inf.0, and (/ -0.0) is -inf.0, so they are obviously
distinguishable, and `eqv?` must not treat them as the same.  As long as
your inexact reals are IEEE binaries, you can just distinguish this one
case and then fall back to =.

-- 
John Cowan       http://www.ccil.org/~cowan        <cowan@x>
        You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
        You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
                Clear all so!  `Tis a Jute.... (Finnegans Wake 16.5)

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports