\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;z \le -1.614448996584022 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{\sin y}{\frac{y}{x}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{\frac{1}{\frac{y}{\sin y}}}}\\
\end{array}double f(double x, double y, double z) {
double r23866760 = x;
double r23866761 = y;
double r23866762 = sin(r23866761);
double r23866763 = r23866762 / r23866761;
double r23866764 = r23866760 * r23866763;
double r23866765 = z;
double r23866766 = r23866764 / r23866765;
return r23866766;
}
double f(double x, double y, double z) {
double r23866767 = z;
double r23866768 = -1.614448996584022e+210;
bool r23866769 = r23866767 <= r23866768;
double r23866770 = y;
double r23866771 = sin(r23866770);
double r23866772 = x;
double r23866773 = r23866770 / r23866772;
double r23866774 = r23866771 / r23866773;
double r23866775 = r23866774 / r23866767;
double r23866776 = 1.0;
double r23866777 = r23866770 / r23866771;
double r23866778 = r23866776 / r23866777;
double r23866779 = r23866767 / r23866778;
double r23866780 = r23866772 / r23866779;
double r23866781 = r23866769 ? r23866775 : r23866780;
return r23866781;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.7 |
|---|---|
| Target | 0.3 |
| Herbie | 3.2 |
if z < -1.614448996584022e+210Initial program 0.1
rmApplied *-un-lft-identity0.1
Applied associate-/r*0.1
Simplified8.4
if -1.614448996584022e+210 < z Initial program 3.0
rmApplied associate-/l*2.7
rmApplied clear-num2.7
Final simplification3.2
herbie shell --seed 2019163 +o rules:numerics
(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))