\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le -7744513270.8935337066650390625:\\
\;\;\;\;\frac{\frac{\sin y \cdot x}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{\sin y}{y}}{z}\\
\end{array}double f(double x, double y, double z) {
double r21423312 = x;
double r21423313 = y;
double r21423314 = sin(r21423313);
double r21423315 = r21423314 / r21423313;
double r21423316 = r21423312 * r21423315;
double r21423317 = z;
double r21423318 = r21423316 / r21423317;
return r21423318;
}
double f(double x, double y, double z) {
double r21423319 = x;
double r21423320 = -7744513270.893534;
bool r21423321 = r21423319 <= r21423320;
double r21423322 = y;
double r21423323 = sin(r21423322);
double r21423324 = r21423323 * r21423319;
double r21423325 = r21423324 / r21423322;
double r21423326 = z;
double r21423327 = r21423325 / r21423326;
double r21423328 = r21423323 / r21423322;
double r21423329 = r21423328 / r21423326;
double r21423330 = r21423319 * r21423329;
double r21423331 = r21423321 ? r21423327 : r21423330;
return r21423331;
}




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 clear-num0.2
Taylor expanded around inf 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))