\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \leq -6.199495381344021 \cdot 10^{+71}:\\
\;\;\;\;y \cdot \frac{x}{\frac{0.5 \cdot \left(\frac{a}{z} \cdot t\right) - z}{z}}\\
\mathbf{elif}\;z \leq 9.586635798481338 \cdot 10^{+25}:\\
\;\;\;\;\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(y \cdot \left(\sqrt[3]{x} \cdot \frac{z}{\left(\sqrt[3]{\sqrt{z \cdot z - a \cdot t}} \cdot \sqrt[3]{\sqrt{z \cdot z - a \cdot t}}\right) \cdot \sqrt[3]{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}} \cdot \sqrt[3]{z \cdot z - a \cdot t}}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + \left(\frac{a}{z} \cdot t\right) \cdot -0.5}\right)\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (((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 <= -6.199495381344021e+71)) {
VAR = ((double) (y * (x / (((double) (((double) (0.5 * ((double) ((a / z) * t)))) - z)) / z))));
} else {
double VAR_1;
if ((z <= 9.586635798481338e+25)) {
VAR_1 = ((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) * ((double) (y * ((double) (((double) cbrt(x)) * (z / ((double) (((double) (((double) cbrt(((double) sqrt(((double) (((double) (z * z)) - ((double) (a * t)))))))) * ((double) cbrt(((double) sqrt(((double) (((double) (z * z)) - ((double) (a * t)))))))))) * ((double) cbrt(((double) (((double) cbrt(((double) sqrt(((double) (((double) (z * z)) - ((double) (a * t)))))))) * ((double) cbrt(((double) (((double) (z * z)) - ((double) (a * t)))))))))))))))))));
} else {
VAR_1 = ((double) (x * ((double) (y * (z / ((double) (z + ((double) (((double) ((a / z) * t)) * -0.5)))))))));
}
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 | 7.0 |
if z < -6.19949538134402123e71Initial program 41.4
Simplified38.0
rmApplied add-cube-cbrt38.4
Applied associate-*l*38.4
Simplified38.3
rmApplied pow138.3
Applied pow138.3
Applied pow-prod-down38.3
Applied pow138.3
Applied pow-prod-down38.3
Applied pow138.3
Applied pow138.3
Applied pow-prod-down38.3
Applied pow-prod-down38.3
Simplified38.0
Taylor expanded around -inf 6.3
Simplified2.9
if -6.19949538134402123e71 < z < 9.5866357984813382e25Initial program 12.3
Simplified10.7
rmApplied add-cube-cbrt11.3
Applied associate-*l*11.3
Simplified10.5
rmApplied add-cube-cbrt10.7
rmApplied add-cube-cbrt10.7
Simplified10.7
if 9.5866357984813382e25 < z Initial program 34.7
Simplified32.5
Taylor expanded around inf 6.6
Simplified4.1
Final simplification7.0
herbie shell --seed 2020196
(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)))))