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 5f9942fd43..ee32a1d6bf 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,13 +1,13 @@ #;#; #< String) +(define (out v) (real->decimal-string (real-part v) 5)) + +(out (expt 2.0 3.0)) +(out (expt -2.0 0.5)) ; not a valid optimization, returns a complex diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/extflonums.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/extflonums.rkt index 6326c3b7a3..3a2405a0fc 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/extflonums.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/extflonums.rkt @@ -1,41 +1,41 @@ #;#; #< 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 11:0 (extfl<= 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 12:0 (extfl>= 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 13:0 (extflmin 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 14:0 (extflmax 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 15:0 (extflexpt 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 17:0 (extflabs 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 18:0 (extflround 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 19:0 (extflfloor 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 20:0 (extflceiling 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 21:0 (extfltruncate 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 22:0 (extflsin 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 23:0 (extflcos 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 24:0 (extfltan 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 25:0 (extflasin 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 26:0 (extflacos 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 27:0 (extflatan 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 28:0 (extfllog 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 29:0 (extflexp 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 30:0 (extflsqrt 1.0t0) -- unary extflonum -TR opt: extflonums.rkt 32:0 (->extfl (bitwise-and 1 2)) -- fixnum to extflonum conversion -TR opt: extflonums.rkt 32:9 (bitwise-and 1 2) -- binary fixnum -TR opt: extflonums.rkt 33:0 (real->extfl (bitwise-and 1 2)) -- fixnum to extflonum conversion -TR opt: extflonums.rkt 33:13 (bitwise-and 1 2) -- binary fixnum -TR opt: extflonums.rkt 4:0 (extfl+ 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 5:0 (extfl- 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 6:0 (extfl* 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 7:0 (extfl/ 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 8:0 (extfl= 1.0t0 1.0t0) -- binary extflonum -TR opt: extflonums.rkt 9:0 (extfl< 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 10:5 (extfl* 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 11:5 (extfl/ 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 12:0 (extfl= 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 13:0 (extfl< 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 14:0 (extfl> 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 15:0 (extfl<= 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 16:0 (extfl>= 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 17:0 (extflmin 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 18:0 (extflmax 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 19:0 (extflexpt 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 21:5 (extflabs 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 22:5 (extflround 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 23:5 (extflfloor 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 24:5 (extflceiling 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 25:5 (extfltruncate 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 26:5 (extflsin 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 27:5 (extflcos 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 28:5 (extfltan 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 29:5 (extflasin 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 30:5 (extflacos 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 31:5 (extflatan 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 32:5 (extfllog 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 33:5 (extflexp 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 34:5 (extflsqrt 1.0t0) -- unary extflonum +TR opt: extflonums.rkt 36:14 (bitwise-and 1 2) -- binary fixnum +TR opt: extflonums.rkt 36:5 (->extfl (bitwise-and 1 2)) -- fixnum to extflonum conversion +TR opt: extflonums.rkt 37:18 (bitwise-and 1 2) -- binary fixnum +TR opt: extflonums.rkt 37:5 (real->extfl (bitwise-and 1 2)) -- fixnum to extflonum conversion +TR opt: extflonums.rkt 8:5 (extfl+ 1.0t0 1.0t0) -- binary extflonum +TR opt: extflonums.rkt 9:5 (extfl- 1.0t0 1.0t0) -- binary extflonum END #< String) +(define (out v) (real->decimal-string (extfl->inexact v) 5)) + +(out (extfl+ 1.0t0 1.0t0)) +(out (extfl- 1.0t0 1.0t0)) +(out (extfl* 1.0t0 1.0t0)) +(out (extfl/ 1.0t0 1.0t0)) (extfl= 1.0t0 1.0t0) (extfl< 1.0t0 1.0t0) (extfl> 1.0t0 1.0t0) @@ -81,20 +85,20 @@ END (extflmax 1.0t0 1.0t0) (extflexpt 1.0t0 1.0t0) -(extflabs 1.0t0) -(extflround 1.0t0) -(extflfloor 1.0t0) -(extflceiling 1.0t0) -(extfltruncate 1.0t0) -(extflsin 1.0t0) -(extflcos 1.0t0) -(extfltan 1.0t0) -(extflasin 1.0t0) -(extflacos 1.0t0) -(extflatan 1.0t0) -(extfllog 1.0t0) -(extflexp 1.0t0) -(extflsqrt 1.0t0) +(out (extflabs 1.0t0)) +(out (extflround 1.0t0)) +(out (extflfloor 1.0t0)) +(out (extflceiling 1.0t0)) +(out (extfltruncate 1.0t0)) +(out (extflsin 1.0t0)) +(out (extflcos 1.0t0)) +(out (extfltan 1.0t0)) +(out (extflasin 1.0t0)) +(out (extflacos 1.0t0)) +(out (extflatan 1.0t0)) +(out (extfllog 1.0t0)) +(out (extflexp 1.0t0)) +(out (extflsqrt 1.0t0)) -(->extfl (bitwise-and 1 2)) -(real->extfl (bitwise-and 1 2)) +(out (->extfl (bitwise-and 1 2))) +(out (real->extfl (bitwise-and 1 2)))