[r6rs-discuss] [Formal] eq?/eqv? misbehave around NaNs

From: Michael Sperber <sperber>
Date: Sun Nov 19 13:44:52 2006

John Cowan <cowan_at_ccil.org> writes:

> The fact that (= +nan.0 +nan.0) is #f has unexpected knock-on effects
> on eq? and eqv?.
>
> In particular, (lambda (x) (eqv? x x) +nan.0) and its equivalent
> (lambda (x) (eq? x x) +nan.0) are compelled to return #f by the
> definitions of eqv? and eq?.

I'm probably missing something, but where does it say that? Note that
the definition of `eqv?' says that = on numbers of the same exactness
implies eqv?, but that the same is not true for the case that = does
not hold: As far as I can see, `(eqv? +nan.0 +nan.0)' is unspecified
per the wording in the draft.

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
Received on Sun Nov 19 2006 - 05:34:57 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC