\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 r499182 = x;
double r499183 = y;
double r499184 = sin(r499183);
double r499185 = r499184 / r499183;
double r499186 = r499182 * r499185;
double r499187 = z;
double r499188 = r499186 / r499187;
return r499188;
}
double f(double x, double y, double z) {
double r499189 = y;
double r499190 = sin(r499189);
double r499191 = r499190 / r499189;
double r499192 = z;
double r499193 = x;
double r499194 = r499192 / r499193;
double r499195 = r499191 / r499194;
return r499195;
}




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