[Git][cmucl/cmucl][issue-156-take-2-nan-comparison] Add deftransforms for >= for floats and rationals
Raymond Toy (@rtoy)
gitlab at common-lisp.net
Sun Mar 12 19:32:25 UTC 2023
Raymond Toy pushed to branch issue-156-take-2-nan-comparison at cmucl / cmucl
Commits:
dd3bbe83 by Raymond Toy at 2023-03-11T15:25:33-08:00
Add deftransforms for >= for floats and rationals
Add a deftransform for >= (and <=) to hande when the two args are
different types of floats, just like how < is done.
Likewise, add a deftransform to handle comparisons between a float and
rational. This is the same as how it's handled for < and friends.
- - - - -
1 changed file:
- src/compiler/float-tran.lisp
Changes:
=====================================
src/compiler/float-tran.lisp
=====================================
@@ -568,7 +568,7 @@
(%deftransform x '(function (rational float) *) #'float-contagion-arg1)
(%deftransform x '(function (float rational) *) #'float-contagion-arg2))
-(dolist (x '(= < > + * / -))
+(dolist (x '(= < > + * / - #+x86 <= #+x86 >=))
(%deftransform x '(function (single-float double-float) *)
#'float-contagion-arg1)
(%deftransform x '(function (double-float single-float) *)
@@ -591,7 +591,11 @@
`(,',op x (float y x)))))
(frob <)
(frob >)
- (frob =))
+ (frob =)
+ #+x86
+ (frob <=)
+ #+x86
+ (frob >=))
;; Convert (/ x n) to (* x (/ n)) when x is a float and n is a power
;; of two, because (/ n) can be reprsented exactly.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/dd3bbe83eeb868486a31d46c41d905bbcb2dad9d
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/dd3bbe83eeb868486a31d46c41d905bbcb2dad9d
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/20230312/90d7ccdf/attachment-0001.html>
More information about the cmucl-cvs
mailing list