\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -4.611098198946549 \cdot 10^{108}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 3.1007095082743632 \cdot 10^{95}:\\
\;\;\;\;\left(\frac{\sqrt[3]{y}}{\frac{\frac{\frac{\left|\sqrt[3]{\sqrt{z \cdot z - t \cdot a}}\right|}{\sqrt[3]{z}}}{\sqrt[3]{z}}}{\sqrt[3]{y}}} \cdot \frac{x}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\right) \cdot \frac{\sqrt[3]{y}}{\frac{\sqrt{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}}{\sqrt[3]{z}}}\\
\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 <= -4.611098198946549e+108)) {
temp = (-1.0 * (x * y));
} else {
double temp_1;
if ((z <= 3.100709508274363e+95)) {
temp_1 = (((cbrt(y) / (((fabs(cbrt(sqrt(((z * z) - (t * a))))) / cbrt(z)) / cbrt(z)) / cbrt(y))) * (x / sqrt(sqrt(((z * z) - (t * a)))))) * (cbrt(y) / (sqrt(cbrt(sqrt(((z * z) - (t * a))))) / cbrt(z))));
} 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 | 25.2 |
|---|---|
| Target | 7.9 |
| Herbie | 6.3 |
if z < -4.611098198946549e+108Initial program 44.9
Taylor expanded around -inf 2.4
if -4.611098198946549e+108 < z < 3.100709508274363e+95Initial program 11.9
rmApplied associate-/l*10.0
rmApplied *-un-lft-identity10.0
Applied add-sqr-sqrt10.0
Applied sqrt-prod10.3
Applied times-frac10.2
Applied times-frac11.2
Simplified11.2
rmApplied add-cube-cbrt11.7
Applied add-cube-cbrt11.5
Applied sqrt-prod11.6
Applied times-frac11.5
Applied add-cube-cbrt11.8
Applied times-frac11.3
Applied associate-*r*9.0
Simplified9.0
if 3.100709508274363e+95 < z Initial program 42.8
Taylor expanded around inf 2.5
Final simplification6.3
herbie shell --seed 2020060
(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)))))