[r6rs-discuss] Re: [Formal] eq?/eqv? misbehave around NaNs
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Tue Nov 28 15:29:11 EST 2006
Alan Watson <alan at alan-watson.org> writes:
> Does this work, assuming x and y are both inexact numbers and we have
> IEEE arithmetic?
>
> (cond
> ((nan? x) (nan? y))
> ((and (zero? x) (zero? y)) (= (/ 1.0 x) (/ 1.0 y)))
> (else (= x y)))
Yes.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the r6rs-discuss
mailing list