Consider 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 (on Windows, at least), which
breaks the encompassing code (which tests the above expression for non-nil).
Fair enough. 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. That seems odd
to me, since NaN means "not a number" and numberp means "a number", but I
guess I can live with a little oddness.
In the Elisp manual, I didn't find a predicate to test for NaN.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel