\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.83688052385958634 \cdot 10^{147}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 7.81915659501391094 \cdot 10^{125}:\\
\;\;\;\;\frac{x}{\frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}} \cdot \frac{y}{\frac{\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 VAR;
if ((z <= -1.8368805238595863e+147)) {
VAR = (-1.0 * (x * y));
} else {
double VAR_1;
if ((z <= 7.819156595013911e+125)) {
VAR_1 = ((x / ((cbrt(sqrt(((z * z) - (t * a)))) * cbrt(sqrt(((z * z) - (t * a))))) / (cbrt(z) * cbrt(z)))) * (y / (cbrt(sqrt(((z * z) - (t * a)))) / cbrt(z))));
} else {
VAR_1 = (x * y);
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.3 |
|---|---|
| Target | 8.2 |
| Herbie | 5.9 |
if z < -1.8368805238595863e+147Initial program 52.2
Taylor expanded around -inf 1.8
if -1.8368805238595863e+147 < z < 7.819156595013911e+125Initial program 11.2
rmApplied associate-/l*9.4
rmApplied add-cube-cbrt10.2
Applied add-cube-cbrt9.7
Applied times-frac9.7
Applied times-frac8.0
if 7.819156595013911e+125 < z Initial program 46.5
Taylor expanded around inf 1.9
Final simplification5.9
herbie shell --seed 2020106
(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)))))