\frac{x \cdot \frac{\sin y}{y}}{z}\frac{\frac{\sin y}{y}}{z} \cdot xdouble f(double x, double y, double z) {
double r312285 = x;
double r312286 = y;
double r312287 = sin(r312286);
double r312288 = r312287 / r312286;
double r312289 = r312285 * r312288;
double r312290 = z;
double r312291 = r312289 / r312290;
return r312291;
}
double f(double x, double y, double z) {
double r312292 = y;
double r312293 = sin(r312292);
double r312294 = r312293 / r312292;
double r312295 = z;
double r312296 = r312294 / r312295;
double r312297 = x;
double r312298 = r312296 * r312297;
return r312298;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.6 |
|---|---|
| Target | 0.3 |
| Herbie | 2.7 |
Initial program 2.6
rmApplied clear-num2.7
rmApplied clear-num3.1
Simplified3.4
Final simplification2.7
herbie shell --seed 2019304
(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))