diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt index af54affb..cfa39cec 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt @@ -144,8 +144,8 @@ #:do [(log-unboxing-opt "unboxed unary float complex")] #:with (bindings ...) #`(c1.bindings ... - [(real-binding) (unsafe-fl- 0.0 c1.real-binding)] - [(imag-binding) (unsafe-fl- 0.0 c1.imag-binding)])) + [(real-binding) (unsafe-fl* -1.0 c1.real-binding)] + [(imag-binding) (unsafe-fl* -1.0 c1.imag-binding)])) (pattern (#%plain-app op:*^ c1:unboxed-float-complex-opt-expr diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/unary-minus-float-complex.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/unary-minus-float-complex.rkt new file mode 100644 index 00000000..44c51ce1 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/optimizer/tests/unary-minus-float-complex.rkt @@ -0,0 +1,13 @@ +#;#; +#<