\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.1315032243066199 \cdot 10^{154}:\\
\;\;\;\;x \cdot \left(-1 \cdot y\right)\\
\mathbf{elif}\;z \le 1.2924444412571481 \cdot 10^{68}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r366009 = x;
double r366010 = y;
double r366011 = r366009 * r366010;
double r366012 = z;
double r366013 = r366011 * r366012;
double r366014 = r366012 * r366012;
double r366015 = t;
double r366016 = a;
double r366017 = r366015 * r366016;
double r366018 = r366014 - r366017;
double r366019 = sqrt(r366018);
double r366020 = r366013 / r366019;
return r366020;
}
double f(double x, double y, double z, double t, double a) {
double r366021 = z;
double r366022 = -1.1315032243066199e+154;
bool r366023 = r366021 <= r366022;
double r366024 = x;
double r366025 = -1.0;
double r366026 = y;
double r366027 = r366025 * r366026;
double r366028 = r366024 * r366027;
double r366029 = 1.292444441257148e+68;
bool r366030 = r366021 <= r366029;
double r366031 = r366024 * r366026;
double r366032 = r366021 * r366021;
double r366033 = t;
double r366034 = a;
double r366035 = r366033 * r366034;
double r366036 = r366032 - r366035;
double r366037 = sqrt(r366036);
double r366038 = r366021 / r366037;
double r366039 = r366031 * r366038;
double r366040 = r366030 ? r366039 : r366031;
double r366041 = r366023 ? r366028 : r366040;
return r366041;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.7 |
|---|---|
| Target | 7.5 |
| Herbie | 6.4 |
if z < -1.1315032243066199e+154Initial program 53.4
rmApplied *-un-lft-identity53.4
Applied sqrt-prod53.4
Applied times-frac53.0
Simplified53.0
rmApplied associate-*l*53.0
Taylor expanded around -inf 0.9
if -1.1315032243066199e+154 < z < 1.292444441257148e+68Initial program 11.0
rmApplied *-un-lft-identity11.0
Applied sqrt-prod11.0
Applied times-frac9.3
Simplified9.3
if 1.292444441257148e+68 < z Initial program 39.8
Taylor expanded around inf 2.7
Final simplification6.4
herbie shell --seed 2020021
(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.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))