X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ffloat.impure.lisp;h=7225011cb4c7b18554445c2718e3eda08650f3e8;hb=c8cc0137e55e6179f6af344f42e54f514660f68b;hp=36fdd6f59889a4a759520703006ed3a798b35d1f;hpb=39e38e4c91fdfc368c60220a1b38ffefb86ff403;p=sbcl.git diff --git a/tests/float.impure.lisp b/tests/float.impure.lisp index 36fdd6f..7225011 100644 --- a/tests/float.impure.lisp +++ b/tests/float.impure.lisp @@ -35,13 +35,13 @@ (declare (type (simple-array double-float (2)) p)) (aref p 1)) (defun order39 (points) - (sort points #'(lambda (p1 p2) - (let* ((y1 (point39-y p1)) - (y2 (point39-y p2))) - (if (= y1 y2) - (< (point39-x p1) - (point39-x p2)) - (< y1 y2)))))) + (sort points (lambda (p1 p2) + (let* ((y1 (point39-y p1)) + (y2 (point39-y p2))) + (if (= y1 y2) + (< (point39-x p1) + (point39-x p2)) + (< y1 y2)))))) (defun test39 () (order39 (make-array 4 :initial-contents (list (point39 0.0d0 0.0d0) @@ -54,5 +54,19 @@ #(2.0d0 2.0d0) #(3.0d0 3.0d0)))) +(defun complex-double-float-ppc (x y) + (declare (type (complex double-float) x y)) + (declare (optimize speed)) + (+ x y)) +(compile 'complex-double-float-ppc) +(assert (= (complex-double-float-ppc #c(0.0d0 1.0d0) #c(2.0d0 3.0d0)) + #c(2.0d0 4.0d0))) + +(defun single-float-ppc (x) + (declare (type (signed-byte 32) x) (optimize speed)) + (float x 1f0)) +(compile 'single-float-ppc) +(assert (= (single-float-ppc -30) -30f0)) + ;;; success (quit :unix-status 104)