From 327da031cd638a52628bc0b45ca9984fd49807fb Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sat, 13 Jul 2019 21:41:58 +0200 Subject: [PATCH] ieee-fp: fix asin/acos/asinh/acosh/atanh for NaN --- src/lsp/numlib.lsp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lsp/numlib.lsp b/src/lsp/numlib.lsp index 17c590f87..fa9b087f0 100644 --- a/src/lsp/numlib.lsp +++ b/src/lsp/numlib.lsp @@ -151,7 +151,7 @@ RADIANS) and (SIN RADIANS) respectively." (setf ,arg (float ,arg))) (typecase ,arg (single-float - (if ,restriction + (if (or ,restriction #+ieee-floating-point (ext:float-nan-p ,arg)) (ffi::c-inline (,arg) (:float) :float ,(format nil "~af(#0)" name) :one-liner t) @@ -162,7 +162,7 @@ RADIANS) and (SIN RADIANS) respectively." #-complex-float (progn ,@gencomplex))) (double-float - (if ,restriction + (if (or ,restriction #+ieee-floating-point (ext:float-nan-p ,arg)) (ffi::c-inline (,arg) (:double) :double ,(format nil "~a(#0)" name) :one-liner t) @@ -173,7 +173,7 @@ RADIANS) and (SIN RADIANS) respectively." #-complex-float (progn ,@gencomplex))) (long-float - (if ,restriction + (if (or ,restriction #+ieee-floating-point (ext:float-nan-p ,arg)) (ffi::c-inline (,arg) (:long-double) :long-double ,(format nil "~al(#0)" name) :one-liner t)