Fix optimization on exp of complex numbers.
Found using random testing. original commit: b808d2809e4856614248b2308d4a21bbca4400f7
This commit is contained in:
parent
e0394683a2
commit
a0821131dc
12
collects/tests/typed-racket/optimizer/tests/complex-exp.rkt
Normal file
12
collects/tests/typed-racket/optimizer/tests/complex-exp.rkt
Normal file
|
@ -0,0 +1,12 @@
|
|||
#;
|
||||
(
|
||||
TR opt: complex-exp.rkt 12:8 0 -- float-arg-expr in complex ops
|
||||
TR opt: complex-exp.rkt 12:3 (exp 0) -- unboxed unary float complex
|
||||
TR opt: complex-exp.rkt 12:11 1.0+2.0i -- unboxed literal
|
||||
TR opt: complex-exp.rkt 12:0 (- (exp 0) 1.0+2.0i) -- unboxed binary float complex
|
||||
0.0-2.0i
|
||||
)
|
||||
|
||||
#lang typed/racket
|
||||
|
||||
(- (exp 0) 1.0+2.0i)
|
|
@ -305,7 +305,7 @@
|
|||
#'1.0))
|
||||
((real-binding) #,(if (syntax->datum #'c.imag-binding)
|
||||
#'(unsafe-fl* (unsafe-flcos c.imag-binding) scaling-factor)
|
||||
#'0.0))
|
||||
#'1.0))
|
||||
((imag-binding) #,(if (syntax->datum #'c.imag-binding)
|
||||
#'(unsafe-fl* (unsafe-flsin c.imag-binding) scaling-factor)
|
||||
#'0.0)))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user