diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float.rkt index b39b475022..2a6400842c 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float.rkt @@ -15,7 +15,7 @@ (mk-unsafe-tbl generic "fl~a" "unsafe-fl~a")) (define binary-float-ops - (mk-float-tbl (list #'+ #'- #'* #'/ #'min #'max))) + (mk-float-tbl (list #'+ #'- #'* #'/ #'min #'max #'expt))) (define binary-float-comps (dict-set* (mk-float-tbl (list #'= #'<= #'< #'> #'>=)) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/missed-optimizations/fixnum.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/missed-optimizations/fixnum.rkt index 82a5a0a45a..1ca6c29dd7 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/missed-optimizations/fixnum.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/missed-optimizations/fixnum.rkt @@ -4,6 +4,8 @@ TR info: fixnum.rkt 12:0 (fx* (values (ann x Index)) (values (ann y Index))) -- TR info: fixnum.rkt 15:0 (fx+ (+ 300 301) (+ 301 302)) -- non-optimized fixnum op TR info: fixnum.rkt 16:0 (fxquotient -4 -5) -- non-optimized fixnum op TR info: fixnum.rkt 44:28 (- 1 (expt 2 (- (system-type (quote word)) 2))) -- possible exact real arith +TR info: fixnum.rkt 44:33 (expt 2 (- (system-type (quote word)) 2)) -- possible exact real arith +TR info: fixnum.rkt 45:28 (expt 2 (- (system-type (quote word)) 2)) -- possible exact real arith TR missed opt: fixnum.rkt 10:0 (+ (ann z Fixnum) 234) -- out of fixnum range TR missed opt: fixnum.rkt 11:0 (* (ann x Index) (ann y Index)) -- out of fixnum range TR missed opt: fixnum.rkt 14:0 (+ (+ 300 301) (+ 301 302)) -- out of fixnum range diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/exact-inexact.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/exact-inexact.rkt index 997f1a4cf3..904cbaa226 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/exact-inexact.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/exact-inexact.rkt @@ -1,10 +1,14 @@ #;#; #<inexact (expt 10 100)) -- int to float TR opt: exact-inexact.rkt 3:0 (round (exact->inexact (expt 2.3 3.2))) -- unary float +TR opt: exact-inexact.rkt 3:23 (expt 2.3 3.2) -- binary float TR opt: exact-inexact.rkt 3:7 (exact->inexact (expt 2.3 3.2)) -- float to float TR opt: exact-inexact.rkt 4:0 (real->double-flonum (expt 10 100)) -- int to float TR opt: exact-inexact.rkt 5:0 (round (real->double-flonum (expt 2.3 3.2))) -- unary float +TR opt: exact-inexact.rkt 5:28 (expt 2.3 3.2) -- binary float TR opt: exact-inexact.rkt 5:7 (real->double-flonum (expt 2.3 3.2)) -- float to float TR opt: exact-inexact.rkt 8:0 (exact->inexact (expt 1.0f0 2.0f0)) -- single-float to single-float TR opt: exact-inexact.rkt 9:0 (real->single-flonum (expt 1.0f0 2.0f0)) -- single-float to single-float diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/expt.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/expt.rkt index 1f16401e6a..5f9942fd43 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/expt.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/expt.rkt @@ -1,9 +1,15 @@ #;#; #<