X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=tests%2Ffloat.impure.lisp;h=518a122ecb812032f3483ab47d4fc441d6ff383e;hb=3a2c2a2217f77e0d1a44a581c83e0311ebc2594a;hp=7225011cb4c7b18554445c2718e3eda08650f3e8;hpb=ecf9476f9e868be0ee969901e075b84d7afcf9ae;p=sbcl.git diff --git a/tests/float.impure.lisp b/tests/float.impure.lisp index 7225011..518a122 100644 --- a/tests/float.impure.lisp +++ b/tests/float.impure.lisp @@ -68,5 +68,32 @@ (compile 'single-float-ppc) (assert (= (single-float-ppc -30) -30f0)) +;;; constant-folding irrational functions +(declaim (inline df)) +(defun df (x) + ;; do not remove the ECASE here: the bug this checks for indeed + ;; depended on this configuration + (ecase x (1 least-positive-double-float))) +(macrolet ((test (fun) + (let ((name (intern (format nil "TEST-CONSTANT-~A" fun)))) + `(progn + (defun ,name () (,fun (df 1))) + (,name))))) + (test sqrt) + (test log) + (test sin) + (test cos) + (test tan) + (test asin) + (test acos) + (test atan) + (test sinh) + (test cosh) + (test tanh) + (test asinh) + (test acosh) + (test atanh) + (test exp)) + ;;; success (quit :unix-status 104)