| ... |
... |
@@ -90,12 +90,8 @@ |
|
90
|
90
|
|
|
91
|
91
|
(define-test %acosh.exceptions
|
|
92
|
92
|
(:tag :fdlibm)
|
|
93
|
|
- ;; Core-math returns infinity instead of signaling overflow.
|
|
94
|
|
- #-core-math
|
|
95
|
93
|
(assert-error 'floating-point-overflow
|
|
96
|
94
|
(kernel:%acosh ext:double-float-positive-infinity))
|
|
97
|
|
- ;; Core-math currently returns QNaN
|
|
98
|
|
- #-core-math
|
|
99
|
95
|
(assert-error 'floating-point-invalid-operation
|
|
100
|
96
|
(kernel:%acosh 0d0))
|
|
101
|
97
|
(ext:with-float-traps-masked (:overflow)
|
| ... |
... |
@@ -108,12 +104,8 @@ |
|
108
|
104
|
(:tag :fdlibm)
|
|
109
|
105
|
(assert-error 'floating-point-invalid-operation
|
|
110
|
106
|
(kernel:%asinh *snan*))
|
|
111
|
|
- ;; Core-math returns the signed infinity instead of signaling an
|
|
112
|
|
- ;; overflow.
|
|
113
|
|
- #-core-math
|
|
114
|
107
|
(assert-error 'floating-point-overflow
|
|
115
|
108
|
(kernel:%asinh ext:double-float-positive-infinity))
|
|
116
|
|
- #-core-math
|
|
117
|
109
|
(assert-error 'floating-point-overflow
|
|
118
|
110
|
(kernel:%asinh ext:double-float-negative-infinity))
|
|
119
|
111
|
(assert-true (ext:float-nan-p (kernel:%asinh *qnan*)))
|
| ... |
... |
@@ -218,7 +210,6 @@ |
|
218
|
210
|
(ext:with-float-traps-masked (:overflow)
|
|
219
|
211
|
(assert-equal ext:double-float-positive-infinity
|
|
220
|
212
|
(kernel:%exp 710d0)))
|
|
221
|
|
- #-core-math
|
|
222
|
213
|
(let ((modes (ext:get-floating-point-modes)))
|
|
223
|
214
|
(unwind-protect
|
|
224
|
215
|
(progn
|
| ... |
... |
@@ -675,6 +666,14 @@ |
|
675
|
666
|
|
|
676
|
667
|
(define-test %cos.exceptions
|
|
677
|
668
|
(:tag :fdlibm)
|
|
|
669
|
+ ;; cos(inf) signals invalid operation
|
|
|
670
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
671
|
+ (kernel:%cos ext:double-float-positive-infinity))
|
|
|
672
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
673
|
+ (kernel:%cos ext:double-float-negative-infinity))
|
|
|
674
|
+ ;; cos(nan) is NaN
|
|
|
675
|
+ (assert-true (ext:float-nan-p (kernel:%cos *qnan*)))
|
|
|
676
|
+
|
|
678
|
677
|
;; cos(x) = 1 for |x| < 2^-27. Signal inexact unless x = 0
|
|
679
|
678
|
(let ((x (scale-float 1d0 -28))
|
|
680
|
679
|
(x0 0d0))
|
| ... |
... |
@@ -690,6 +689,14 @@ |
|
690
|
689
|
|
|
691
|
690
|
(define-test %sin.exceptions
|
|
692
|
691
|
(:tag :fdlibm)
|
|
|
692
|
+ ;; sin(inf) signals invalid operation
|
|
|
693
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
694
|
+ (kernel:%sin ext:double-float-positive-infinity))
|
|
|
695
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
696
|
+ (kernel:%sin ext:double-float-negative-infinity))
|
|
|
697
|
+ ;; sin(nan) is NaN
|
|
|
698
|
+ (assert-true (ext:float-nan-p (kernel:%sin *qnan*)))
|
|
|
699
|
+
|
|
693
|
700
|
;; sin(x) = x for |x| < 2^-27. Signal inexact unless x = 0
|
|
694
|
701
|
(let ((x (scale-float 1d0 -28))
|
|
695
|
702
|
(x0 0d0))
|
| ... |
... |
@@ -705,6 +712,14 @@ |
|
705
|
712
|
|
|
706
|
713
|
(define-test %tan.exceptions
|
|
707
|
714
|
(:tag :fdlibm)
|
|
|
715
|
+ ;; tan(inf) signals invalid operation
|
|
|
716
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
717
|
+ (kernel:%tan ext:double-float-positive-infinity))
|
|
|
718
|
+ (assert-error 'floating-point-invalid-operation
|
|
|
719
|
+ (kernel:%tan ext:double-float-negative-infinity))
|
|
|
720
|
+ ;; tan(nan) is NaN
|
|
|
721
|
+ (assert-true (ext:float-nan-p (kernel:%sin *qnan*)))
|
|
|
722
|
+
|
|
708
|
723
|
;; tan(x) = x for |x| < 2^-28. Signal inexact unless x = 0
|
|
709
|
724
|
(let ((x (scale-float 1d0 -29))
|
|
710
|
725
|
(x0 0d0))
|