\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le 3.883506706037952 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{\frac{z}{\frac{\sin y}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot \frac{\sin y}{y}}}\\
\end{array}double f(double x, double y, double z) {
double r24868114 = x;
double r24868115 = y;
double r24868116 = sin(r24868115);
double r24868117 = r24868116 / r24868115;
double r24868118 = r24868114 * r24868117;
double r24868119 = z;
double r24868120 = r24868118 / r24868119;
return r24868120;
}
double f(double x, double y, double z) {
double r24868121 = x;
double r24868122 = 3.883506706037952e-64;
bool r24868123 = r24868121 <= r24868122;
double r24868124 = z;
double r24868125 = y;
double r24868126 = sin(r24868125);
double r24868127 = r24868126 / r24868125;
double r24868128 = r24868124 / r24868127;
double r24868129 = r24868121 / r24868128;
double r24868130 = 1.0;
double r24868131 = r24868121 * r24868127;
double r24868132 = r24868124 / r24868131;
double r24868133 = r24868130 / r24868132;
double r24868134 = r24868123 ? r24868129 : r24868133;
return r24868134;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.7 |
|---|---|
| Target | 0.3 |
| Herbie | 1.8 |
if x < 3.883506706037952e-64Initial program 3.7
rmApplied associate-/l*2.1
if 3.883506706037952e-64 < x Initial program 0.5
rmApplied clear-num0.9
Final simplification1.8
herbie shell --seed 2019163
(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))