\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.1707719178549918 \cdot 10^{83}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 5.7646822522115484 \cdot 10^{131}:\\
\;\;\;\;\frac{x \cdot y}{\sqrt{\sqrt{z \cdot z - t \cdot a}}} \cdot \frac{z}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (((x * y) * z) / sqrt(((z * z) - (t * a))));
}
double code(double x, double y, double z, double t, double a) {
double temp;
if ((z <= -1.1707719178549918e+83)) {
temp = (-1.0 * (x * y));
} else {
double temp_1;
if ((z <= 5.7646822522115484e+131)) {
temp_1 = (((x * y) / sqrt(sqrt(((z * z) - (t * a))))) * (z / sqrt(sqrt(((z * z) - (t * a))))));
} else {
temp_1 = (x * y);
}
temp = temp_1;
}
return temp;
}




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.7 |
if z < -1.1707719178549918e+83Initial program 42.2
Taylor expanded around -inf 2.6
if -1.1707719178549918e+83 < z < 5.7646822522115484e+131Initial program 10.9
rmApplied add-sqr-sqrt10.9
Applied sqrt-prod11.0
Applied times-frac9.8
if 5.7646822522115484e+131 < z Initial program 49.0
Taylor expanded around inf 1.4
Final simplification6.7
herbie shell --seed 2020053
(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)))))