\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 r25067189 = x;
double r25067190 = y;
double r25067191 = sin(r25067190);
double r25067192 = r25067191 / r25067190;
double r25067193 = r25067189 * r25067192;
double r25067194 = z;
double r25067195 = r25067193 / r25067194;
return r25067195;
}
double f(double x, double y, double z) {
double r25067196 = x;
double r25067197 = 3.883506706037952e-64;
bool r25067198 = r25067196 <= r25067197;
double r25067199 = z;
double r25067200 = y;
double r25067201 = sin(r25067200);
double r25067202 = r25067201 / r25067200;
double r25067203 = r25067199 / r25067202;
double r25067204 = r25067196 / r25067203;
double r25067205 = 1.0;
double r25067206 = r25067196 * r25067202;
double r25067207 = r25067199 / r25067206;
double r25067208 = r25067205 / r25067207;
double r25067209 = r25067198 ? r25067204 : r25067208;
return r25067209;
}




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))