fixed bug in (eqv? 0.0 -0.0) returning #t.
This commit is contained in:
parent
29edb9d800
commit
bbafcc08d2
|
@ -251,7 +251,13 @@
|
|||
(import (ikarus))
|
||||
(cond
|
||||
[(eq? x y) #t]
|
||||
[(flonum? x) (and (flonum? y) (fl=? x y))]
|
||||
[(flonum? x)
|
||||
(and (flonum? y)
|
||||
(if ($fl= x 0.0)
|
||||
(and ($fl= y 0.0)
|
||||
($fl= ($fl/ 1.0 x)
|
||||
($fl/ 1.0 y)))
|
||||
(fl=? x y)))]
|
||||
[(bignum? x) (and (bignum? y) (= x y))]
|
||||
[(ratnum? x) (and (ratnum? y) (= x y))]
|
||||
[(compnum? x)
|
||||
|
|
|
@ -1 +1 @@
|
|||
1629
|
||||
1631
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
(test-eqv -0.0 0.0 #f)
|
||||
(test-eqv -0.0 -0.0 #t))
|
||||
|
||||
|
||||
|
||||
(define (test-exact-integer-sqrt)
|
||||
(define (f i j inc)
|
||||
(when (< i j)
|
||||
|
@ -67,4 +65,5 @@
|
|||
(define (run-tests)
|
||||
(test-rounding)
|
||||
(test-exact-integer-sqrt)
|
||||
#;(test-eqv)))
|
||||
(test-eqv))
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue