\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)0.5 \cdot \frac{\sin re}{e^{im}} + e^{im} \cdot \left(0.5 \cdot \sin re\right)(FPCore (re im) :precision binary64 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
(FPCore (re im) :precision binary64 (+ (* 0.5 (/ (sin re) (exp im))) (* (exp im) (* 0.5 (sin re)))))
double code(double re, double im) {
return ((double) (((double) (0.5 * ((double) sin(re)))) * ((double) (((double) exp(((double) (0.0 - im)))) + ((double) exp(im))))));
}
double code(double re, double im) {
return ((double) (((double) (0.5 * (((double) sin(re)) / ((double) exp(im))))) + ((double) (((double) exp(im)) * ((double) (0.5 * ((double) sin(re))))))));
}



Bits error versus re



Bits error versus im
Results
Initial program 0.0
rmApplied distribute-lft-in0.0
Simplified0.0
Simplified0.0
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020198
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))