\frac{x \cdot \frac{\sin y}{y}}{z}\frac{x}{z \cdot \frac{y}{\sin y}}double f(double x, double y, double z) {
double r330290 = x;
double r330291 = y;
double r330292 = sin(r330291);
double r330293 = r330292 / r330291;
double r330294 = r330290 * r330293;
double r330295 = z;
double r330296 = r330294 / r330295;
return r330296;
}
double f(double x, double y, double z) {
double r330297 = x;
double r330298 = z;
double r330299 = y;
double r330300 = sin(r330299);
double r330301 = r330299 / r330300;
double r330302 = r330298 * r330301;
double r330303 = r330297 / r330302;
return r330303;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.7 |
|---|---|
| Target | 0.3 |
| Herbie | 2.7 |
if z < -5.867173042175517e+38 or 2.8069313034736843e-68 < z Initial program 0.3
rmApplied clear-num0.4
if -5.867173042175517e+38 < z < 2.8069313034736843e-68Initial program 5.8
rmApplied associate-/l*0.2
Final simplification2.7
herbie shell --seed 2019298
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< z -4.21737202034271466e-29) (/ (* x (/ 1 (/ y (sin y)))) z) (if (< z 4.44670236911381103e64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))