\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -5.199714169449318426725790466332778930458 \cdot 10^{116}:\\
\;\;\;\;x \cdot \left(-1 \cdot y\right)\\
\mathbf{elif}\;z \le 2.818827562843424905673562246640834606804 \cdot 10^{156}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r288044 = x;
double r288045 = y;
double r288046 = r288044 * r288045;
double r288047 = z;
double r288048 = r288046 * r288047;
double r288049 = r288047 * r288047;
double r288050 = t;
double r288051 = a;
double r288052 = r288050 * r288051;
double r288053 = r288049 - r288052;
double r288054 = sqrt(r288053);
double r288055 = r288048 / r288054;
return r288055;
}
double f(double x, double y, double z, double t, double a) {
double r288056 = z;
double r288057 = -5.1997141694493184e+116;
bool r288058 = r288056 <= r288057;
double r288059 = x;
double r288060 = -1.0;
double r288061 = y;
double r288062 = r288060 * r288061;
double r288063 = r288059 * r288062;
double r288064 = 2.818827562843425e+156;
bool r288065 = r288056 <= r288064;
double r288066 = r288056 * r288056;
double r288067 = t;
double r288068 = a;
double r288069 = r288067 * r288068;
double r288070 = r288066 - r288069;
double r288071 = sqrt(r288070);
double r288072 = r288056 / r288071;
double r288073 = r288061 * r288072;
double r288074 = r288059 * r288073;
double r288075 = r288059 * r288061;
double r288076 = r288065 ? r288074 : r288075;
double r288077 = r288058 ? r288063 : r288076;
return r288077;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.1 |
|---|---|
| Target | 7.5 |
| Herbie | 6.0 |
if z < -5.1997141694493184e+116Initial program 47.7
rmApplied *-un-lft-identity47.7
Applied sqrt-prod47.7
Applied times-frac45.7
Simplified45.7
rmApplied associate-*l*45.7
Taylor expanded around -inf 1.7
if -5.1997141694493184e+116 < z < 2.818827562843425e+156Initial program 10.9
rmApplied *-un-lft-identity10.9
Applied sqrt-prod10.9
Applied times-frac8.7
Simplified8.7
rmApplied associate-*l*8.4
if 2.818827562843425e+156 < z Initial program 54.8
Taylor expanded around inf 1.3
Final simplification6.0
herbie shell --seed 2019322
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z -3.1921305903852764e46) (- (* y x)) (if (< z 5.9762681209208942e90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))