\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 r638439 = x;
double r638440 = y;
double r638441 = sin(r638440);
double r638442 = r638441 / r638440;
double r638443 = r638439 * r638442;
double r638444 = z;
double r638445 = r638443 / r638444;
return r638445;
}
double f(double x, double y, double z) {
double r638446 = x;
double r638447 = z;
double r638448 = r638446 / r638447;
double r638449 = y;
double r638450 = sin(r638449);
double r638451 = r638449 / r638450;
double r638452 = r638448 / r638451;
return r638452;
}




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 +o rules:numerics
(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))