[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q on NaN
From: |
Luc Teirlinck |
Subject: |
Re: Q on NaN |
Date: |
Fri, 24 Jun 2005 17:31:23 -0500 (CDT) |
Drew Adams wrote:
Does anyone know that these are not equivalent:
(equal 0.0e+NaN) <=?=> (and (numberp x) (/= x x))
That is, are there any objects equal to 0.0e+NaN that are not NaN?
They are equivalent. internal_equal contains:
case Lisp_Float:
{
double d1, d2;
d1 = extract_float (o1);
d2 = extract_float (o2);
/* If d is a NaN, then d != d. Two NaNs should be `equal' even
though they are not =. */
return d1 == d2 || (d1 != d1 && d2 != d2);
}
Yes, for testing a numberp to see if it is not NaN. However, I am
testing an arbitrary object. For that, (and (numberp x) (/= x x))
works and (equal x 0.0e+Nan) works.
Yes.
Sincerely,
Luc.
- Q on NaN, Drew Adams, 2005/06/24
- RE: Q on NaN, Drew Adams, 2005/06/24
- Re: Q on NaN, Eli Zaretskii, 2005/06/24
- RE: Q on NaN, Drew Adams, 2005/06/24
- Re: Q on NaN, Luc Teirlinck, 2005/06/24
- Re: Q on NaN, Gaƫtan LEURENT, 2005/06/24
- Re: Q on NaN, Eli Zaretskii, 2005/06/24
- RE: Q on NaN, Drew Adams, 2005/06/24
- Re: Q on NaN,
Luc Teirlinck <=
- RE: Q on NaN, Drew Adams, 2005/06/24
- Re: Q on NaN, Richard M. Stallman, 2005/06/25
RE: Q on NaN, Drew Adams, 2005/06/24