\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 r34678007 = x;
double r34678008 = y;
double r34678009 = sin(r34678008);
double r34678010 = r34678009 / r34678008;
double r34678011 = r34678007 * r34678010;
double r34678012 = z;
double r34678013 = r34678011 / r34678012;
return r34678013;
}
double f(double x, double y, double z) {
double r34678014 = x;
double r34678015 = -7744513270.893534;
bool r34678016 = r34678014 <= r34678015;
double r34678017 = y;
double r34678018 = sin(r34678017);
double r34678019 = r34678014 * r34678018;
double r34678020 = r34678019 / r34678017;
double r34678021 = z;
double r34678022 = r34678020 / r34678021;
double r34678023 = r34678018 / r34678017;
double r34678024 = r34678023 / r34678021;
double r34678025 = r34678014 * r34678024;
double r34678026 = r34678016 ? r34678022 : r34678025;
return r34678026;
}




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