\frac{x \cdot \frac{\sin y}{y}}{z}\frac{\frac{x}{z}}{\frac{y}{\sin y}}double f(double x, double y, double z) {
double r569385 = x;
double r569386 = y;
double r569387 = sin(r569386);
double r569388 = r569387 / r569386;
double r569389 = r569385 * r569388;
double r569390 = z;
double r569391 = r569389 / r569390;
return r569391;
}
double f(double x, double y, double z) {
double r569392 = x;
double r569393 = z;
double r569394 = r569392 / r569393;
double r569395 = y;
double r569396 = sin(r569395);
double r569397 = r569395 / r569396;
double r569398 = r569394 / r569397;
return r569398;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.7 |
|---|---|
| Target | 0.3 |
| Herbie | 3.0 |
Initial program 2.7
rmApplied associate-/l*3.0
Simplified3.0
rmApplied associate-/r*3.0
Final simplification3.0
herbie shell --seed 2020042
(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))