fix flround on [-0.5, 0.0)
original commit: 9679b21d99477a077b226bc279a6d68ebbd7ce5b
This commit is contained in:
parent
8479c4bebf
commit
e11d9c846e
|
@ -2186,6 +2186,8 @@
|
|||
(fl= (round 0.5000000000000001) 1.0)
|
||||
(eqv? (round 0.0) 0.0)
|
||||
(eqv? (round -0.0) -0.0)
|
||||
(eqv? (round -0.5) -0.0)
|
||||
(eqv? (round -0.6) -1.0)
|
||||
)
|
||||
|
||||
(mat abs
|
||||
|
|
|
@ -654,6 +654,11 @@
|
|||
(fl= (flround 2.5) 2.0)
|
||||
(fl= (flround 0.5000000000000000) 0.0)
|
||||
(fl= (flround 0.5000000000000001) 1.0)
|
||||
(eqv? (flround 0.0) 0.0)
|
||||
(eqv? (flround -0.0) -0.0)
|
||||
(eqv? (flround 0.5) 0.0)
|
||||
(eqv? (flround -0.5) -0.0)
|
||||
(fl= (flround -0.5000000000000001) -1.0)
|
||||
)
|
||||
|
||||
(mat flinteger?
|
||||
|
|
|
@ -630,9 +630,11 @@
|
|||
(if (fl< x threshold+)
|
||||
(fl- (fl+ x threshold+) threshold+)
|
||||
x)
|
||||
(if (fl> x threshold-)
|
||||
(fl- (fl+ x threshold-) threshold-)
|
||||
x))))
|
||||
(if (fl>= x -0.5)
|
||||
-0.0 ; keep negative
|
||||
(if (fl> x threshold-)
|
||||
(fl- (fl+ x threshold-) threshold-)
|
||||
x)))))
|
||||
|
||||
;;; The generic comparison entries assume the fixnum case is inlined.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user