[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] EQV? and NaN
From: |
Aleksej Saushev |
Subject: |
Re: [Chicken-users] EQV? and NaN |
Date: |
Thu, 14 Jul 2011 02:26:56 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) |
Hello!
John Cowan <address@hidden> writes:
> 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".
Sorry? This is plain wrong.
Two different NaNs are _not_ the same, and there exist at least two
different NaNs (signalling and quiet, see IEEE 754). Two different
signalling NaNs are _not_ the same, since they encode _different_ events.
At least the _may_ be different.
> 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.
Given that "-nan.0" returns "+nan.0" this should be quiet NaN, right?
There may exist two different ways to get "+nan.0" and these may be different
per standard.
--
HE CE3OH...
Re: [Chicken-users] EQV? and NaN,
Aleksej Saushev <=