| ... |
... |
@@ -214,7 +214,6 @@ |
|
214
|
214
|
(ext:with-float-traps-masked (:overflow)
|
|
215
|
215
|
(assert-equal ext:double-float-positive-infinity
|
|
216
|
216
|
(kernel:%exp 710d0)))
|
|
217
|
|
- #-core-math
|
|
218
|
217
|
(let ((modes (ext:get-floating-point-modes)))
|
|
219
|
218
|
(unwind-protect
|
|
220
|
219
|
(progn
|
| ... |
... |
@@ -671,6 +670,14 @@ |
|
671
|
670
|
|
|
672
|
671
|
(define-test %cos.exceptions
|
|
673
|
672
|
(:tag :fdlibm)
|
|
|
673
|
+ ;; cos(inf) signals invalid operation
|
|
|
674
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
675
|
+ (kernel:%cos ext:double-float-positive-infinity))
|
|
|
676
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
677
|
+ (kernel:%cos ext:double-float-negative-infinity))
|
|
|
678
|
+ ;; cos(nan) is NaN
|
|
|
679
|
+ (assert-true (ext:float-nan-p (kernel:%cos *qnan*)))
|
|
|
680
|
+
|
|
674
|
681
|
;; cos(x) = 1 for |x| < 2^-27. Signal inexact unless x = 0
|
|
675
|
682
|
(let ((x (scale-float 1d0 -28))
|
|
676
|
683
|
(x0 0d0))
|
| ... |
... |
@@ -686,6 +693,14 @@ |
|
686
|
693
|
|
|
687
|
694
|
(define-test %sin.exceptions
|
|
688
|
695
|
(:tag :fdlibm)
|
|
|
696
|
+ ;; sin(inf) signals invalid operation
|
|
|
697
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
698
|
+ (kernel:%sin ext:double-float-positive-infinity))
|
|
|
699
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
700
|
+ (kernel:%sin ext:double-float-negative-infinity))
|
|
|
701
|
+ ;; sin(nan) is NaN
|
|
|
702
|
+ (assert-true (ext:float-nan-p (kernel:%sin *qnan*)))
|
|
|
703
|
+
|
|
689
|
704
|
;; sin(x) = x for |x| < 2^-27. Signal inexact unless x = 0
|
|
690
|
705
|
(let ((x (scale-float 1d0 -28))
|
|
691
|
706
|
(x0 0d0))
|
| ... |
... |
@@ -701,6 +716,14 @@ |
|
701
|
716
|
|
|
702
|
717
|
(define-test %tan.exceptions
|
|
703
|
718
|
(:tag :fdlibm)
|
|
|
719
|
+ ;; tan(inf) signals invalid operation
|
|
|
720
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
721
|
+ (kernel:%tan ext:double-float-positive-infinity))
|
|
|
722
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
723
|
+ (kernel:%tan ext:double-float-negative-infinity))
|
|
|
724
|
+ ;; tan(nan) is NaN
|
|
|
725
|
+ (assert-true (ext:float-nan-p (kernel:%sin *qnan*)))
|
|
|
726
|
+
|
|
704
|
727
|
;; tan(x) = x for |x| < 2^-28. Signal inexact unless x = 0
|
|
705
|
728
|
(let ((x (scale-float 1d0 -29))
|
|
706
|
729
|
(x0 0d0))
|