\frac{\cosh x \cdot \frac{y}{x}}{z}\begin{array}{l}
\mathbf{if}\;y \le -3.38157623106928596 \cdot 10^{54}:\\
\;\;\;\;\cosh x \cdot \left(\frac{\sqrt{1}}{x} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;y \le 3.006240253092873 \cdot 10^{32}:\\
\;\;\;\;\cosh x \cdot \frac{\frac{y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \left(\frac{\frac{1}{x}}{z} \cdot y\right)\\
\end{array}double f(double x, double y, double z) {
double r553332 = x;
double r553333 = cosh(r553332);
double r553334 = y;
double r553335 = r553334 / r553332;
double r553336 = r553333 * r553335;
double r553337 = z;
double r553338 = r553336 / r553337;
return r553338;
}
double f(double x, double y, double z) {
double r553339 = y;
double r553340 = -3.381576231069286e+54;
bool r553341 = r553339 <= r553340;
double r553342 = x;
double r553343 = cosh(r553342);
double r553344 = 1.0;
double r553345 = sqrt(r553344);
double r553346 = r553345 / r553342;
double r553347 = z;
double r553348 = r553339 / r553347;
double r553349 = r553346 * r553348;
double r553350 = r553343 * r553349;
double r553351 = 3.006240253092873e+32;
bool r553352 = r553339 <= r553351;
double r553353 = r553339 / r553342;
double r553354 = r553353 / r553347;
double r553355 = r553343 * r553354;
double r553356 = r553344 / r553342;
double r553357 = r553356 / r553347;
double r553358 = r553357 * r553339;
double r553359 = r553343 * r553358;
double r553360 = r553352 ? r553355 : r553359;
double r553361 = r553341 ? r553350 : r553360;
return r553361;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 7.9 |
|---|---|
| Target | 0.4 |
| Herbie | 0.6 |
if y < -3.381576231069286e+54Initial program 27.1
rmApplied *-un-lft-identity27.1
Applied times-frac27.0
Simplified27.0
Simplified0.3
rmApplied clear-num0.4
rmApplied div-inv0.5
Applied add-cube-cbrt0.5
Applied times-frac0.4
Simplified0.4
Simplified0.3
rmApplied add-sqr-sqrt0.3
Applied times-frac0.4
Applied associate-*l*0.4
Simplified0.4
if -3.381576231069286e+54 < y < 3.006240253092873e+32Initial program 0.6
rmApplied *-un-lft-identity0.6
Applied times-frac0.7
Simplified0.7
Simplified9.9
rmApplied associate-/r*0.7
if 3.006240253092873e+32 < y Initial program 24.9
rmApplied *-un-lft-identity24.9
Applied times-frac24.8
Simplified24.8
Simplified0.3
rmApplied clear-num0.4
rmApplied div-inv0.5
Applied add-cube-cbrt0.5
Applied times-frac0.5
Simplified0.5
Simplified0.4
rmApplied associate-/r*0.4
Final simplification0.6
herbie shell --seed 2020056
(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.0385305359351529e-39) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x))))
(/ (* (cosh x) (/ y x)) z))