\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le -6.02386663058320886942785091003252010013 \cdot 10^{79}:\\
\;\;\;\;\frac{\frac{x}{\frac{y}{\sin y}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{\frac{\sin y}{y}}}\\
\end{array}double f(double x, double y, double z) {
double r23320593 = x;
double r23320594 = y;
double r23320595 = sin(r23320594);
double r23320596 = r23320595 / r23320594;
double r23320597 = r23320593 * r23320596;
double r23320598 = z;
double r23320599 = r23320597 / r23320598;
return r23320599;
}
double f(double x, double y, double z) {
double r23320600 = x;
double r23320601 = -6.023866630583209e+79;
bool r23320602 = r23320600 <= r23320601;
double r23320603 = y;
double r23320604 = sin(r23320603);
double r23320605 = r23320603 / r23320604;
double r23320606 = r23320600 / r23320605;
double r23320607 = z;
double r23320608 = r23320606 / r23320607;
double r23320609 = r23320604 / r23320603;
double r23320610 = r23320607 / r23320609;
double r23320611 = r23320600 / r23320610;
double r23320612 = r23320602 ? r23320608 : r23320611;
return r23320612;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.8 |
|---|---|
| Target | 0.3 |
| Herbie | 1.8 |
if x < -6.023866630583209e+79Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied associate-/r*0.2
Simplified0.2
if -6.023866630583209e+79 < x Initial program 3.2
rmApplied associate-/l*2.0
Final simplification1.8
herbie shell --seed 2019174
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:herbie-target
(if (< z -4.2173720203427147e-29) (/ (* x (/ 1.0 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1.0 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))