) ; EVAL-WHEN
\f
+#!+x86 ;; for constant folding
+(macrolet ((def (name ll)
+ `(defun ,name ,ll (,name ,@ll))))
+ (def %atan2 (x y))
+ (def %atan (x))
+ (def %tan-quick (x))
+ (def %cos-quick (x))
+ (def %sin-quick (x))
+ (def %sqrt (x))
+ (def %log (x))
+ (def %exp (x)))
+
;;;; stubs for the Unix math library
;;;;
;;;; Many of these are unnecessary on the X86 because they're built
(def-math-rtn "acos" 1)
#!-x86 (def-math-rtn "atan" 1)
#!-x86 (def-math-rtn "atan2" 2)
-#!+x86 ;; for constant folding
-(defun %atan2 (x y)
- (%atan2 x y))
(def-math-rtn "sinh" 1)
(def-math-rtn "cosh" 1)
(def-math-rtn "tanh" 1)
(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)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.21.25"
+"0.8.21.26"