\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \cdot \frac{\sin y}{y} \le -4.5545988867587666 \cdot 10^{-295}:\\
\;\;\;\;\frac{x \cdot \frac{1}{\frac{y}{\sin y}}}{z}\\
\mathbf{elif}\;x \cdot \frac{\sin y}{y} \le 7.56936427636939772 \cdot 10^{-202}:\\
\;\;\;\;x \cdot \frac{\frac{\sin y}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}}{\frac{\frac{1}{\sin y}}{\frac{\sqrt[3]{1}}{y}}}}{z}\\
\end{array}double f(double x, double y, double z) {
double r425492 = x;
double r425493 = y;
double r425494 = sin(r425493);
double r425495 = r425494 / r425493;
double r425496 = r425492 * r425495;
double r425497 = z;
double r425498 = r425496 / r425497;
return r425498;
}
double f(double x, double y, double z) {
double r425499 = x;
double r425500 = y;
double r425501 = sin(r425500);
double r425502 = r425501 / r425500;
double r425503 = r425499 * r425502;
double r425504 = -4.554598886758767e-295;
bool r425505 = r425503 <= r425504;
double r425506 = 1.0;
double r425507 = r425500 / r425501;
double r425508 = r425506 / r425507;
double r425509 = r425499 * r425508;
double r425510 = z;
double r425511 = r425509 / r425510;
double r425512 = 7.569364276369398e-202;
bool r425513 = r425503 <= r425512;
double r425514 = r425502 / r425510;
double r425515 = r425499 * r425514;
double r425516 = cbrt(r425506);
double r425517 = r425516 * r425516;
double r425518 = r425517 / r425506;
double r425519 = r425506 / r425501;
double r425520 = r425516 / r425500;
double r425521 = r425519 / r425520;
double r425522 = r425518 / r425521;
double r425523 = r425499 * r425522;
double r425524 = r425523 / r425510;
double r425525 = r425513 ? r425515 : r425524;
double r425526 = r425505 ? r425511 : r425525;
return r425526;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.7 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
if (* x (/ (sin y) y)) < -4.554598886758767e-295Initial program 0.2
rmApplied clear-num0.2
if -4.554598886758767e-295 < (* x (/ (sin y) y)) < 7.569364276369398e-202Initial program 10.7
rmApplied *-un-lft-identity10.7
Applied times-frac0.3
Simplified0.3
if 7.569364276369398e-202 < (* x (/ (sin y) y)) Initial program 0.2
rmApplied clear-num0.2
rmApplied div-inv0.3
Applied associate-/r*0.2
rmApplied *-un-lft-identity0.2
Applied add-cube-cbrt0.2
Applied times-frac0.2
Applied associate-/l*0.3
Final simplification0.2
herbie shell --seed 2020021
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:precision binary64
: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))