\frac{\cosh x \cdot \frac{y}{x}}{z}\frac{\left(e^{x} + e^{-x}\right) \cdot y}{z \cdot \left(2 \cdot x\right)}double f(double x, double y, double z) {
double r296598 = x;
double r296599 = cosh(r296598);
double r296600 = y;
double r296601 = r296600 / r296598;
double r296602 = r296599 * r296601;
double r296603 = z;
double r296604 = r296602 / r296603;
return r296604;
}
double f(double x, double y, double z) {
double r296605 = x;
double r296606 = exp(r296605);
double r296607 = -r296605;
double r296608 = exp(r296607);
double r296609 = r296606 + r296608;
double r296610 = y;
double r296611 = r296609 * r296610;
double r296612 = z;
double r296613 = 2.0;
double r296614 = r296613 * r296605;
double r296615 = r296612 * r296614;
double r296616 = r296611 / r296615;
return r296616;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 7.7 |
|---|---|
| Target | 0.4 |
| Herbie | 7.0 |
if z < -7446916366273207.0 or 2.5406453345129323e-27 < z Initial program 11.4
rmApplied cosh-def11.4
Applied frac-times11.4
Applied associate-/l/0.4
if -7446916366273207.0 < z < 2.5406453345129323e-27Initial program 0.3
rmApplied cosh-def0.3
Applied frac-times0.3
Final simplification7.0
herbie shell --seed 2019304
(FPCore (x y z)
:name "Linear.Quaternion:$ctan from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< y -4.618902267687042e-52) (* (/ (/ y z) x) (cosh x)) (if (< y 1.03853053593515302e-39) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x))))
(/ (* (cosh x) (/ y x)) z))