[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Q on NaN
From: |
Drew Adams |
Subject: |
RE: Q on NaN |
Date: |
Fri, 24 Jun 2005 12:33:53 -0700 |
I said this:
(condition-case nil (setq foo (/ 0.0 0.0)) (arith-error nil))
In older versions of Emacs (at least prior to April 2005 CVS),
this would evaluate to nil. Now, it evaluates to -0.0NaN.
I can modify the code like so:
(and (condition-case nil (setq foo (/ 0.0 0.0)) (arith-error nil))
(bar foo)) ; foo must be a number, not a NaN
What function do I use for bar?
`numberp' doesn't work, since (numberp -0.0NaN) is non-nil.
To make the point simpler:
(numberp (/0.0 0.0)) returns t. That seems like a bug to me.
- Q on NaN, Drew Adams, 2005/06/24
- RE: Q on NaN,
Drew Adams <=
- 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, 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