[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 15:59:11 -0500 (CDT) |
Drew Adams wrote:
That doesn't tell me how to test if `foobar' is a NaN. See my previous
email: I knew I could test `(equal foo 0.0e+Nan)', but I thought I would
need to test against all of the possible NaN values.
The GNU C library has an isnan macro. From Lisp you could do:
(defun nanp (obj)
"Return t if OBJ is a NaN; nil otherwise,"
(and (numberp obj) (/= obj obj)))
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 <=
- 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, 2005/06/24
- 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