\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -6.76145830290999486 \cdot 10^{153}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le -8.5049186523994108 \cdot 10^{-253}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{elif}\;z \le 1.9983883551142221 \cdot 10^{137}:\\
\;\;\;\;\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{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 <= -6.761458302909995e+153)) {
VAR = (-1.0 * (x * y));
} else {
double VAR_1;
if ((z <= -8.504918652399411e-253)) {
VAR_1 = (x * (y / (sqrt(((z * z) - (t * a))) / z)));
} else {
double VAR_2;
if ((z <= 1.998388355114222e+137)) {
VAR_2 = ((x * y) / (sqrt(((z * z) - (t * a))) / z));
} else {
VAR_2 = (x * y);
}
VAR_1 = VAR_2;
}
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.3 |
|---|---|
| Target | 7.7 |
| Herbie | 6.4 |
if z < -6.761458302909995e+153Initial program 54.4
Taylor expanded around -inf 1.4
if -6.761458302909995e+153 < z < -8.504918652399411e-253Initial program 11.0
rmApplied associate-/l*8.1
rmApplied *-un-lft-identity8.1
Applied *-un-lft-identity8.1
Applied sqrt-prod8.1
Applied times-frac8.1
Applied times-frac7.3
Simplified7.3
if -8.504918652399411e-253 < z < 1.998388355114222e+137Initial program 11.8
rmApplied associate-/l*10.2
if 1.998388355114222e+137 < z Initial program 50.6
Taylor expanded around inf 1.6
Final simplification6.4
herbie shell --seed 2020079
(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)))))