\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le -7744513270.8935337066650390625:\\
\;\;\;\;\frac{\frac{x \cdot \sin y}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{\sin y}{y}}{z}\\
\end{array}double f(double x, double y, double z) {
double r30572327 = x;
double r30572328 = y;
double r30572329 = sin(r30572328);
double r30572330 = r30572329 / r30572328;
double r30572331 = r30572327 * r30572330;
double r30572332 = z;
double r30572333 = r30572331 / r30572332;
return r30572333;
}
double f(double x, double y, double z) {
double r30572334 = x;
double r30572335 = -7744513270.893534;
bool r30572336 = r30572334 <= r30572335;
double r30572337 = y;
double r30572338 = sin(r30572337);
double r30572339 = r30572334 * r30572338;
double r30572340 = r30572339 / r30572337;
double r30572341 = z;
double r30572342 = r30572340 / r30572341;
double r30572343 = r30572338 / r30572337;
double r30572344 = r30572343 / r30572341;
double r30572345 = r30572334 * r30572344;
double r30572346 = r30572336 ? r30572342 : r30572345;
return r30572346;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.8 |
|---|---|
| Target | 0.3 |
| Herbie | 1.5 |
if x < -7744513270.893534Initial program 0.2
rmApplied associate-*r/0.3
if -7744513270.893534 < x Initial program 3.5
rmApplied *-un-lft-identity3.5
Applied times-frac1.9
Simplified1.9
Final simplification1.5
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:herbie-target
(if (< z -4.2173720203427147e-29) (/ (* x (/ 1.0 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1.0 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))