bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting NaN to integer 0.


From: Luc Teirlinck
Subject: Re: Converting NaN to integer 0.
Date: Tue, 12 Feb 2002 17:49:09 -0600 (CST)

The value that the integer rounding functions return when passed NaN
seems indeed to be very much machine dependent.  They returned 0 on
the machine I used previously (mentioned in the return of the
emacs-version function).  This occurred both in Emacs20.7 and 21.1.90.
They return -1 in the setup below.

** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (floor 0.0e+NaN)
-1
ELISP> (ceiling 0.0e+NaN)
-1
ELISP> (truncate 0.0e+NaN)
-1
ELISP> (round 0.0e+NaN)
-1
ELISP> (emacs-version)
"GNU Emacs 20.7.1 (sparc-sun-solaris2.8, X toolkit)\n of Thu Apr 12
2001 on eel\"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]