Raymond Toy pushed to branch issue-425-correctly-rounded-math-functions at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • tests/fdlibm.lisp
    ... ... @@ -90,8 +90,12 @@
    90 90
     
    
    91 91
     (define-test %acosh.exceptions
    
    92 92
       (:tag :fdlibm)
    
    93
    +  ;; Core-math returns infinity instead of signaling overflow.
    
    94
    +  #-core-math
    
    93 95
       (assert-error 'floating-point-overflow
    
    94 96
     		(kernel:%acosh ext:double-float-positive-infinity))
    
    97
    +  ;; Core-math currently returns QNaN
    
    98
    +  #-core-math
    
    95 99
       (assert-error 'floating-point-invalid-operation
    
    96 100
     		(kernel:%acosh 0d0))
    
    97 101
       (ext:with-float-traps-masked (:overflow)
    
    ... ... @@ -104,8 +108,12 @@
    104 108
       (:tag :fdlibm)
    
    105 109
       (assert-error 'floating-point-invalid-operation
    
    106 110
     		(kernel:%asinh *snan*))
    
    111
    +  ;; Core-math returns the signed infinity instead of signaling an
    
    112
    +  ;; overflow.
    
    113
    +  #-core-math
    
    107 114
       (assert-error 'floating-point-overflow
    
    108 115
     		(kernel:%asinh ext:double-float-positive-infinity))
    
    116
    +  #-core-math
    
    109 117
       (assert-error 'floating-point-overflow
    
    110 118
     		(kernel:%asinh ext:double-float-negative-infinity))
    
    111 119
       (assert-true (ext:float-nan-p (kernel:%asinh *qnan*)))
    
    ... ... @@ -172,10 +180,12 @@
    172 180
       (:tag :fdlibm)
    
    173 181
       (assert-error 'floating-point-invalid-operation
    
    174 182
     		(kernel:%log1p -2d0))
    
    175
    -  (assert-error 'floating-point-overflow
    
    183
    +  (assert-error #-core-math 'floating-point-overflow
    
    184
    +		#+core-math 'division-by-zero
    
    176 185
     		(kernel:%log1p -1d0))
    
    177 186
       (assert-true (ext:float-nan-p (kernel:%log1p *qnan*)))
    
    178
    -  (ext:with-float-traps-masked (:overflow)
    
    187
    +  (ext:with-float-traps-masked (#-core-math :overflow
    
    188
    +				#+core-math :divide-by-zero)
    
    179 189
         (assert-equal ext:double-float-negative-infinity
    
    180 190
     		  (kernel:%log1p -1d0)))
    
    181 191
       (ext:with-float-traps-masked (:invalid)