\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le -4.807101316999124 \cdot 10^{+93}:\\
\;\;\;\;\frac{\frac{x}{\frac{y}{\sin y}}}{z}\\
\mathbf{elif}\;x \le 0.0015208711258388175:\\
\;\;\;\;\frac{x}{\frac{z}{\frac{\sin y}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{y}{\sin y}} \cdot x}{z}\\
\end{array}double f(double x, double y, double z) {
double r8652524 = x;
double r8652525 = y;
double r8652526 = sin(r8652525);
double r8652527 = r8652526 / r8652525;
double r8652528 = r8652524 * r8652527;
double r8652529 = z;
double r8652530 = r8652528 / r8652529;
return r8652530;
}
double f(double x, double y, double z) {
double r8652531 = x;
double r8652532 = -4.807101316999124e+93;
bool r8652533 = r8652531 <= r8652532;
double r8652534 = y;
double r8652535 = sin(r8652534);
double r8652536 = r8652534 / r8652535;
double r8652537 = r8652531 / r8652536;
double r8652538 = z;
double r8652539 = r8652537 / r8652538;
double r8652540 = 0.0015208711258388175;
bool r8652541 = r8652531 <= r8652540;
double r8652542 = r8652535 / r8652534;
double r8652543 = r8652538 / r8652542;
double r8652544 = r8652531 / r8652543;
double r8652545 = 1.0;
double r8652546 = r8652545 / r8652536;
double r8652547 = r8652546 * r8652531;
double r8652548 = r8652547 / r8652538;
double r8652549 = r8652541 ? r8652544 : r8652548;
double r8652550 = r8652533 ? r8652539 : r8652549;
return r8652550;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.9 |
|---|---|
| Target | 0.3 |
| Herbie | 0.4 |
if x < -4.807101316999124e+93Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac8.5
Simplified8.5
rmApplied div-inv8.5
rmApplied associate-*r/8.5
Applied associate-*r/0.2
Simplified0.3
if -4.807101316999124e+93 < x < 0.0015208711258388175Initial program 4.4
rmApplied associate-/l*0.4
if 0.0015208711258388175 < x Initial program 0.2
rmApplied clear-num0.3
Final simplification0.4
herbie shell --seed 2019156
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:herbie-target
(if (< z -4.2173720203427147e-29) (/ (* x (/ 1 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))