Correct unary minus in complex numbers.
original commit: 161da0a2eb3393f3e805de7ee27ab6641e65070c
This commit is contained in:
parent
89d248332c
commit
604997de6b
|
@ -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
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#;#;
|
||||
#<<END
|
||||
TR opt: unary-minus-float-complex.rkt 13:0 (imag-part (- 0.0+0.0i)) -- complex accessor elimination
|
||||
TR opt: unary-minus-float-complex.rkt 13:11 (- 0.0+0.0i) -- unboxed unary float complex
|
||||
TR opt: unary-minus-float-complex.rkt 13:14 0.0+0.0i -- unboxed literal
|
||||
TR opt: unary-minus-float-complex.rkt 13:14 0.0+0.0i -- unboxed literal
|
||||
END
|
||||
#<<END
|
||||
-0.0
|
||||
|
||||
END
|
||||
#lang typed/racket
|
||||
(imag-part (- 0.0+0.0i))
|
Loading…
Reference in New Issue
Block a user