\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 r489366 = x;
double r489367 = y;
double r489368 = sin(r489367);
double r489369 = r489368 / r489367;
double r489370 = r489366 * r489369;
double r489371 = z;
double r489372 = r489370 / r489371;
return r489372;
}
double f(double x, double y, double z) {
double r489373 = x;
double r489374 = z;
double r489375 = y;
double r489376 = sin(r489375);
double r489377 = r489376 / r489375;
double r489378 = r489374 / r489377;
double r489379 = r489373 / r489378;
return r489379;
}




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