From: Nikodemus S. <de...@us...> - 2005-04-08 14:23:14
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7138/tests Modified Files: float.impure.lisp Log Message: 0.8.21.26: provide %SQRT &co as functions on x86 for constant folding Index: float.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/float.impure.lisp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- float.impure.lisp 5 Sep 2003 08:15:44 -0000 1.4 +++ float.impure.lisp 8 Apr 2005 14:23:00 -0000 1.5 @@ -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) |