[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] EQV? and NaN
From: |
John Cowan |
Subject: |
[Chicken-users] EQV? and NaN |
Date: |
Sun, 10 Jul 2011 14:02:54 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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.
--
John Cowan <address@hidden> http://www.ccil.org/~cowan
It's like if you meet an really old, really rich guy covered in liver
spots and breathing with an oxygen tank, and you say, "I want to be
rich, too, so I'm going to start walking with a cane and I'm going to
act crotchety and I'm going to get liver disease. --Wil Shipley
- [Chicken-users] EQV? and NaN,
John Cowan <=
Re: [Chicken-users] EQV? and NaN, Aleksej Saushev, 2011/07/13