\left(0.5 \cdot \sin re\right) \cdot \left(e^{0.0 - im} + e^{im}\right)\frac{\left(0.5 \cdot \sin re\right) \cdot \left({\left(e^{0.0 - im}\right)}^{3} + {\left(e^{im}\right)}^{3}\right)}{e^{0.0 - im} \cdot e^{0.0 - im} + \left(e^{im} \cdot e^{im} - e^{0.0 - im} \cdot e^{im}\right)}double code(double re, double im) {
return ((0.5 * sin(re)) * (exp((0.0 - im)) + exp(im)));
}
double code(double re, double im) {
return (((0.5 * sin(re)) * (pow(exp((0.0 - im)), 3.0) + pow(exp(im), 3.0))) / ((exp((0.0 - im)) * exp((0.0 - im))) + ((exp(im) * exp(im)) - (exp((0.0 - im)) * exp(im)))));
}



Bits error versus re



Bits error versus im
Results
Initial program 0.0
rmApplied flip3-+0.1
Applied associate-*r/0.1
Final simplification0.1
herbie shell --seed 2020102
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))