Skip to content
Snippets Groups Projects
Commit 53f3c09f authored by Liam M. Healy's avatar Liam M. Healy
Browse files

CCL don't define +nan+, +positive-infinity+, +negative-infinity+

In CCL, +nan+, +positive-infinity+, +negative-infinity+ are not
defined because of a problem with CCL loading these definitions.
parent 0e6ff4a1
No related branches found
No related tags found
No related merge requests found
;; Mathematical functions ;; Mathematical functions
;; Liam Healy, Wed Mar 8 2006 - 22:09 ;; Liam Healy, Wed Mar 8 2006 - 22:09
;; Time-stamp: <2010-05-22 16:48:47EDT mathematical.lisp> ;; Time-stamp: <2010-07-19 12:33:44EDT mathematical.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
;; ;;
;; This program is free software: you can redistribute it and/or modify ;; This program is free software: you can redistribute it and/or modify
...@@ -53,14 +53,19 @@ ...@@ -53,14 +53,19 @@
(map-name '+negative-infinity+ "gsl_neginf") (map-name '+negative-infinity+ "gsl_neginf")
(map-name '+nan+ "gsl_nan") (map-name '+nan+ "gsl_nan")
;; CCL gives a bizarre error when trying to compile these, even though
;; loading them works fine.
#-ccl
(defconstant +nan+ (defconstant +nan+
(ignore-errors (ignore-errors
(cffi:foreign-funcall "gsl_nan" :double))) (cffi:foreign-funcall "gsl_nan" :double)))
#-ccl
(defconstant +positive-infinity+ (defconstant +positive-infinity+
(ignore-errors (ignore-errors
(cffi:foreign-funcall "gsl_posinf" :double))) (cffi:foreign-funcall "gsl_posinf" :double)))
#-ccl
(defconstant +negative-infinity+ (defconstant +negative-infinity+
(ignore-errors (ignore-errors
(cffi:foreign-funcall "gsl_neginf" :double))) (cffi:foreign-funcall "gsl_neginf" :double)))
...@@ -105,7 +110,7 @@ ...@@ -105,7 +110,7 @@
(defmfun hypotenuse* (x y) (defmfun hypotenuse* (x y)
;; This is redundant; there is "gsl_sf_hypot_e" defined as ;; This is redundant; there is "gsl_sf_hypot_e" defined as
;; #'hyptoenuse. ;; #'hypotenuse.
"gsl_hypot" ((x :double) (y :double)) "gsl_hypot" ((x :double) (y :double))
:c-return :double :c-return :double
:documentation ;FDL :documentation ;FDL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment