\frac{x \cdot \frac{\sin y}{y}}{z}\frac{\frac{\sin y}{y}}{\frac{z}{x}}double f(double x, double y, double z) {
double r558391 = x;
double r558392 = y;
double r558393 = sin(r558392);
double r558394 = r558393 / r558392;
double r558395 = r558391 * r558394;
double r558396 = z;
double r558397 = r558395 / r558396;
return r558397;
}
double f(double x, double y, double z) {
double r558398 = y;
double r558399 = sin(r558398);
double r558400 = r558399 / r558398;
double r558401 = z;
double r558402 = x;
double r558403 = r558401 / r558402;
double r558404 = r558400 / r558403;
return r558404;
}




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 pow12.7
Applied pow12.7
Applied pow-prod-down2.7
rmApplied clear-num3.2
Simplified3.3
rmApplied *-un-lft-identity3.3
Applied *-un-lft-identity3.3
Applied times-frac3.3
Applied *-un-lft-identity3.3
Applied *-un-lft-identity3.3
Applied times-frac3.3
Applied times-frac3.3
Applied add-sqr-sqrt3.3
Applied times-frac3.3
Simplified3.3
Simplified3.0
Final simplification3.0
herbie shell --seed 2020001
(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))