Lisp HUG Maillist Archive

NaN's Exist!!

Lo and behold, I managed to produce a NaN in LWM, denoted as:    1F+-0 #| 1F+-0 is single-float not-a-number |#

It appears that these can be tested by the following code:

(defun nanp (v)
  (and (numberp v)
       (not (or (minusp v)
                (zerop  v)
                (plusp  v)))
       ))



David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ  85750

email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://www.refined-audiometrics.com
Skype: dbmcclain


Updated at: 2020-12-10 08:45 UTC