[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] EQV? and NaN
From: |
Felix |
Subject: |
Re: [Chicken-users] EQV? and NaN |
Date: |
Mon, 11 Jul 2011 22:37:15 +0200 (CEST) |
> I'd like to propose a minor change to the semantics of EQV?. For good
> reasons, = returns #f if either argument is NaN, and currently EQV?
> defers to = if both its arguments are numeric. However, conceptually
> EQV? is about "sameness" rather than "equality", and all NaNs are
> conceptually "the same".
>
> Therefore, I think Chicken should be changed so that (eqv? +nan.0
> +nan.0) => #t. All existing Schemes that support NaN at all already do
> this, with the exception of SISC, which bizarrely returns #t if *either*
> argument is NaN.
"(eqv? +nan +nan)" being #t would mean violation of R5RS.
What's next, John? Make "(number? +nan)" return false?
cheers,
felix
Re: [Chicken-users] EQV? and NaN, Aleksej Saushev, 2011/07/13