\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.4109285273931826 \cdot 10^{+134}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \le 7.381928982606723 \cdot 10^{+116}:\\
\;\;\;\;\left(x \cdot \left(y \cdot \left(\sqrt[3]{z} \cdot \frac{\sqrt[3]{z}}{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}\right)\right)\right) \cdot \frac{\sqrt[3]{z}}{\sqrt{\sqrt[3]{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 ((double) (((double) (((double) (x * y)) * z)) / ((double) sqrt(((double) (((double) (z * z)) - ((double) (t * a))))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((z <= -1.4109285273931826e+134)) {
VAR = ((double) (x * ((double) -(y))));
} else {
double VAR_1;
if ((z <= 7.381928982606723e+116)) {
VAR_1 = ((double) (((double) (x * ((double) (y * ((double) (((double) cbrt(z)) * ((double) (((double) cbrt(z)) / ((double) fabs(((double) cbrt(((double) (((double) (z * z)) - ((double) (t * a)))))))))))))))) * ((double) (((double) cbrt(z)) / ((double) sqrt(((double) cbrt(((double) (((double) (z * z)) - ((double) (t * a))))))))))));
} else {
VAR_1 = ((double) (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 | 25.5 |
|---|---|
| Target | 8.0 |
| Herbie | 6.0 |
if z < -1.4109285273931826e134Initial program 49.5
Simplified48.0
Taylor expanded around -inf 1.6
Simplified1.6
if -1.4109285273931826e134 < z < 7.3819289826067232e116Initial program 11.6
Simplified9.5
rmApplied associate-*r*9.6
rmApplied add-cube-cbrt10.0
Applied sqrt-prod10.0
Applied add-cube-cbrt10.3
Applied times-frac10.3
Applied associate-*r*9.4
Simplified8.5
if 7.3819289826067232e116 < z Initial program 47.3
Simplified45.1
Taylor expanded around inf 1.8
Final simplification6.0
herbie shell --seed 2020184
(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)))))