Eliminate exact->inexact of floats.

This commit is contained in:
Vincent St-Amour 2010-06-28 11:04:44 -04:00
parent dfafc0b295
commit a6872c67a7

View File

@ -187,6 +187,11 @@
#:with opt #:with opt
(begin (log-optimization "int to float" #'op) (begin (log-optimization "int to float" #'op)
#'(->fl n.opt))) #'(->fl n.opt)))
;; we can get rid of it altogether if we're giving it an inexact number
(pattern (#%plain-app (~and op (~literal exact->inexact)) f:float-opt-expr)
#:with opt
(begin (log-optimization "float to float" #'op)
#'f.opt))
(pattern (#%plain-app op:pair-unary-op p:pair-opt-expr) (pattern (#%plain-app op:pair-unary-op p:pair-opt-expr)
#:with opt #:with opt