[Openmcl-devel] Infinity and NaN

Liam Healy lnp at healy.washington.dc.us
Mon Jul 19 09:35:12 PDT 2010


I'm having trouble defining variables that create infinities and NaNs.
I am using GSL
http://www.gnu.org/software/gsl/manual/html_node/Infinities-and-Not_002da_002dnumber.html
to do this; here for example is my definition

(defconstant +nan+
  (ignore-errors
    (cffi:foreign-funcall "gsl_nan" :double)))

If I put this form into the listener, it loads fine, and

+nan+
1D+-0 #| not-a-number |#

However, if I put this definition into a file to compile it,

ASDF could not load gsll because FLOATING-POINT-INVALID-OPERATION detected
performing LOG on (1.0).
> Error: FLOATING-POINT-INVALID-OPERATION detected
>        performing LOG on (1.0)
> While executing: CCL::%FP-ERROR-FROM-STATUS, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.

I'm not sure where this is coming from, nor why taking the log
of 1.0 should be a problem.

Liam


(lisp-implementation-version)
"Version 1.6-dev-r13980M-trunk  (LinuxX8664)"



More information about the Openmcl-devel mailing list