Use correct imaginary binding.

Fixes 13 bugs found using random testing.
This commit is contained in:
Vincent St-Amour 2015-11-06 13:20:53 -06:00
parent b6e6a6fa98
commit 7ba1ab6e51
2 changed files with 8 additions and 2 deletions

View File

@ -357,8 +357,8 @@
#:with imag-binding (if (subtypeof? #'e -Real)
;; values that were originally reals may need to be
;; handled specially
(mark-as-real #'imag-binding)
#'imag-binding)
(mark-as-real #'imag-binding*)
#'imag-binding*)
#:do [(log-unboxing-opt
(if (subtypeof? #'e -Flonum)
"float in complex ops"

View File

@ -1,11 +1,15 @@
#;#;
#<<END
TR missed opt: float-complex-float.rkt 11:3 (make-polar 4.8063810141303426e-57 -1.9082319f0) -- non-complex value in complex arithmetic
TR opt: float-complex-float.rkt 10:0 (/ 2.3454025f0 (flmin (real->double-flonum 1.797693134862315e+308) (real->double-flonum -1.2848677f+32)) (make-rectangular +nan.0 0.0)) -- unboxed binary float complex
TR opt: float-complex-float.rkt 10:105 (make-rectangular +nan.0 0.0) -- make-rectangular elimination
TR opt: float-complex-float.rkt 10:15 (flmin (real->double-flonum 1.797693134862315e+308) (real->double-flonum -1.2848677f+32)) -- binary float
TR opt: float-complex-float.rkt 10:15 (flmin (real->double-flonum 1.797693134862315e+308) (real->double-flonum -1.2848677f+32)) -- float in complex ops
TR opt: float-complex-float.rkt 10:22 (real->double-flonum 1.797693134862315e+308) -- float to float
TR opt: float-complex-float.rkt 10:3 2.3454025f0 -- non float complex in complex ops
TR opt: float-complex-float.rkt 11:0 (+ (make-polar 4.8063810141303426e-57 -1.9082319f0) -0.8414709848078965) -- unboxed binary float complex
TR opt: float-complex-float.rkt 11:3 (make-polar 4.8063810141303426e-57 -1.9082319f0) -- non float complex in complex ops
TR opt: float-complex-float.rkt 11:52 -0.8414709848078965 -- float in complex ops
TR opt: float-complex-float.rkt 4:0 (+ 1.0+2.0i 2.0 3.0+6.0i) -- unboxed binary float complex
TR opt: float-complex-float.rkt 4:12 2.0 -- float in complex ops
TR opt: float-complex-float.rkt 4:16 3.0+6.0i -- unboxed literal
@ -38,6 +42,7 @@ END
+nan.0+0.0i
-inf.0-1.0688403264087485i
+nan.0+0.0i
-0.8414709848078965-4.5353337789114595e-57i
END
#lang typed/scheme
@ -53,3 +58,4 @@ END
(/ 0.0 +inf.0-1.0i)
(* -0.9263371220283309 3/2 (make-rectangular +inf.f 0.7692234292042541))
(/ 2.3454025f0 (flmin (real->double-flonum 1.797693134862315e+308) (real->double-flonum -1.2848677f+32)) (make-rectangular +nan.0 0.0))
(+ (make-polar 4.8063810141303426e-57 -1.9082319f0) -0.8414709848078965)