\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 r857455 = x;
double r857456 = exp(r857455);
double r857457 = -r857455;
double r857458 = exp(r857457);
double r857459 = r857456 + r857458;
double r857460 = 2.0;
double r857461 = r857459 / r857460;
double r857462 = y;
double r857463 = cos(r857462);
double r857464 = r857461 * r857463;
double r857465 = r857456 - r857458;
double r857466 = r857465 / r857460;
double r857467 = sin(r857462);
double r857468 = r857466 * r857467;
double r857469 = /* ERROR: no complex support in C */;
double r857470 = /* ERROR: no complex support in C */;
return r857470;
}
double f(double x, double y) {
double r857471 = 0.5;
double r857472 = y;
double r857473 = cos(r857472);
double r857474 = x;
double r857475 = exp(r857474);
double r857476 = r857473 / r857475;
double r857477 = fma(r857473, r857475, r857476);
double r857478 = r857471 * r857477;
return r857478;
}



Bits error versus x



Bits error versus y
Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019144 +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)))))