\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \cdot \frac{\sin y}{y} \le -3.497842730589283443253731648215616723861 \cdot 10^{-231} \lor \neg \left(x \cdot \frac{\sin y}{y} \le 6.641146027642848148772445195187677057815 \cdot 10^{-283}\right):\\
\;\;\;\;\frac{x \cdot \frac{\sin y}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{\frac{\sin y}{z}}}\\
\end{array}double f(double x, double y, double z) {
double r356160 = x;
double r356161 = y;
double r356162 = sin(r356161);
double r356163 = r356162 / r356161;
double r356164 = r356160 * r356163;
double r356165 = z;
double r356166 = r356164 / r356165;
return r356166;
}
double f(double x, double y, double z) {
double r356167 = x;
double r356168 = y;
double r356169 = sin(r356168);
double r356170 = r356169 / r356168;
double r356171 = r356167 * r356170;
double r356172 = -3.4978427305892834e-231;
bool r356173 = r356171 <= r356172;
double r356174 = 6.641146027642848e-283;
bool r356175 = r356171 <= r356174;
double r356176 = !r356175;
bool r356177 = r356173 || r356176;
double r356178 = z;
double r356179 = r356171 / r356178;
double r356180 = r356169 / r356178;
double r356181 = r356168 / r356180;
double r356182 = r356167 / r356181;
double r356183 = r356177 ? r356179 : r356182;
return r356183;
}




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)) < -3.4978427305892834e-231 or 6.641146027642848e-283 < (* x (/ (sin y) y)) Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac3.6
Simplified3.6
rmApplied associate-*r/0.2
if -3.4978427305892834e-231 < (* x (/ (sin y) y)) < 6.641146027642848e-283Initial program 11.2
rmApplied associate-/l*0.2
Simplified0.3
Final simplification0.2
herbie shell --seed 2019325
(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))