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/8bb4ed863f8dcf1ac5c49c83...