From b529872b2c3aeca9f9994b94c392383baea2c84a Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 21 Jun 2011 00:32:24 +0000 Subject: * lisp/core.lisp.in (%fNaN?): New. * interp/spaderror.lisp (trapNumericErrors): Handle ARITHMETIC-ERROR too. * interp/g-opt.boot ($VMsideEffectFreeOperators): Include %fNaN?. * algebra/clip.spad.pamphlet (TwoDimensionalPlotClipping): Use it. * algebra/plot.spad.pamphlet (Plot): Likewise. --- src/lisp/core.lisp.in | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lisp') diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 87155ec3..64dd3a7d 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -183,6 +183,9 @@ "bootImport" "CONCAT" "$EditorProgram" + + ;; numeric support + "%fNaN?" )) (in-package "AxiomCore") @@ -1324,6 +1327,14 @@ (eval-when (:load-toplevel :execute) (pushnew #'shoe-provide-module sb-ext:*module-provider-functions*)) +;; +;; -*-* Numerics support -*- +;; +(defmacro |%fNaN?| (x) + #+:sbcl `(sb-ext:float-nan-p ,x) + #+:ecl `(ext:float-nan-p ,x) + #-(or :sbcl :ecl) `(/= ,x ,x)) + ;; ;; -*- Native Datatype correspondance -*- ;; -- cgit v1.2.3