[Git][cmucl/cmucl][issue-156-take-2-nan-comparison] Fix bug in two-arg->= and two-arg-<=
Raymond Toy (@rtoy)
gitlab at common-lisp.net
Tue Mar 14 18:58:04 UTC 2023
Raymond Toy pushed to branch issue-156-take-2-nan-comparison at cmucl / cmucl
Commits:
8bb4ed86 by Raymond Toy at 2023-03-14T11:56:27-07:00
Fix bug in two-arg->= and two-arg-<=
We were handling comparisons of a ratio to an integer and vice versa
incorrectly. Use the floor/ceiling appropriately.
Now `(kernel::two-arg->= 4e-8 1)` returns `NIL` as expected instead of
`T`.
- - - - -
1 changed file:
- src/code/numbers.lisp
Changes:
=====================================
src/code/numbers.lisp
=====================================
@@ -1038,7 +1038,7 @@
;; issue #156.
#+x86
(progn
- (two-arg-</> two-arg-<= <= floor ceiling
+ (two-arg-</> two-arg-<= <= ceiling floor
((fixnum bignum)
(bignum-plus-p y))
((bignum fixnum)
@@ -1046,7 +1046,7 @@
((bignum bignum)
(not (plusp (bignum-compare x y)))))
- (two-arg-</> two-arg->= >= ceiling floor
+ (two-arg-</> two-arg->= >= floor ceiling
((fixnum bignum)
(not (bignum-plus-p y)))
((bignum fixnum)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8bb4ed863f8dcf1ac5c49c83cdaafa009ec73110
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8bb4ed863f8dcf1ac5c49c83cdaafa009ec73110
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20230314/2e7e4221/attachment-0001.html>
More information about the cmucl-cvs
mailing list