\frac{x \cdot \frac{\sin y}{y}}{z}\frac{x}{\frac{z}{\frac{\sin y}{y}}}double f(double x, double y, double z) {
double r470403 = x;
double r470404 = y;
double r470405 = sin(r470404);
double r470406 = r470405 / r470404;
double r470407 = r470403 * r470406;
double r470408 = z;
double r470409 = r470407 / r470408;
return r470409;
}
double f(double x, double y, double z) {
double r470410 = x;
double r470411 = z;
double r470412 = y;
double r470413 = sin(r470412);
double r470414 = r470413 / r470412;
double r470415 = r470411 / r470414;
double r470416 = r470410 / r470415;
return r470416;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.7 |
|---|---|
| Target | 0.3 |
| Herbie | 3.3 |
Initial program 2.7
rmApplied associate-/l*3.3
Final simplification3.3
herbie shell --seed 2020081 +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))