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



Bits error versus re



Bits error versus im
Results
Initial program 0.0
Simplified0.0
rmApplied distribute-rgt-in_binary640.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021207
(FPCore (re im)
:name "math.sin on complex, real part"
:precision binary64
(* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))