\Re(\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\frac{1}{2} \cdot \mathsf{fma}\left(\cos y, e^{x}, \frac{\cos y}{e^{x}}\right)double f(double x, double y) {
double r834200 = x;
double r834201 = exp(r834200);
double r834202 = -r834200;
double r834203 = exp(r834202);
double r834204 = r834201 + r834203;
double r834205 = 2.0;
double r834206 = r834204 / r834205;
double r834207 = y;
double r834208 = cos(r834207);
double r834209 = r834206 * r834208;
double r834210 = r834201 - r834203;
double r834211 = r834210 / r834205;
double r834212 = sin(r834207);
double r834213 = r834211 * r834212;
double r834214 = /* ERROR: no complex support in C */;
double r834215 = /* ERROR: no complex support in C */;
return r834215;
}
double f(double x, double y) {
double r834216 = 0.5;
double r834217 = y;
double r834218 = cos(r834217);
double r834219 = x;
double r834220 = exp(r834219);
double r834221 = r834218 / r834220;
double r834222 = fma(r834218, r834220, r834221);
double r834223 = r834216 * r834222;
return r834223;
}



Bits error versus x



Bits error versus y
Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019149 +o rules:numerics
(FPCore (x y)
:name "Euler formula real part (p55)"
(re (complex (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) (* (/ (- (exp x) (exp (- x))) 2) (sin y)))))