\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 r435193 = x;
double r435194 = y;
double r435195 = sin(r435194);
double r435196 = r435195 / r435194;
double r435197 = r435193 * r435196;
double r435198 = z;
double r435199 = r435197 / r435198;
return r435199;
}
double f(double x, double y, double z) {
double r435200 = x;
double r435201 = y;
double r435202 = sin(r435201);
double r435203 = r435202 / r435201;
double r435204 = r435200 * r435203;
double r435205 = -3.4978427305892834e-231;
bool r435206 = r435204 <= r435205;
double r435207 = 6.641146027642848e-283;
bool r435208 = r435204 <= r435207;
double r435209 = !r435208;
bool r435210 = r435206 || r435209;
double r435211 = z;
double r435212 = r435204 / r435211;
double r435213 = r435202 / r435211;
double r435214 = r435201 / r435213;
double r435215 = r435200 / r435214;
double r435216 = r435210 ? r435212 : r435215;
return r435216;
}




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 div-inv3.6
rmApplied un-div-inv3.6
Applied 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))