\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 r622547 = x;
double r622548 = y;
double r622549 = sin(r622548);
double r622550 = r622549 / r622548;
double r622551 = r622547 * r622550;
double r622552 = z;
double r622553 = r622551 / r622552;
return r622553;
}
double f(double x, double y, double z) {
double r622554 = x;
double r622555 = z;
double r622556 = r622554 / r622555;
double r622557 = y;
double r622558 = sin(r622557);
double r622559 = r622557 / r622558;
double r622560 = r622556 / r622559;
return r622560;
}




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))