\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.00611998198886279 \cdot 10^{154}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le -1.11210632775890889 \cdot 10^{-252}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{elif}\;z \le 3.53727166255265831 \cdot 10^{44}:\\
\;\;\;\;\frac{x \cdot \left(y \cdot z\right)}{\sqrt{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.0061199819888628e+154)) {
VAR = ((double) (-1.0 * ((double) (x * y))));
} else {
double VAR_1;
if ((z <= -1.112106327758909e-252)) {
VAR_1 = ((double) (((double) (x * y)) * ((double) (z / ((double) sqrt(((double) (((double) (z * z)) - ((double) (t * a))))))))));
} else {
double VAR_2;
if ((z <= 3.5372716625526583e+44)) {
VAR_2 = ((double) (((double) (x * ((double) (y * z)))) / ((double) sqrt(((double) (((double) (z * z)) - ((double) (t * a))))))));
} else {
VAR_2 = ((double) (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.1 |
|---|---|
| Target | 7.6 |
| Herbie | 6.7 |
if z < -1.00611998198886279e154Initial program 54.4
Taylor expanded around -inf 1.1
if -1.00611998198886279e154 < z < -1.11210632775890889e-252Initial program 10.7
rmApplied *-un-lft-identity10.7
Applied sqrt-prod10.7
Applied times-frac7.3
Simplified7.3
if -1.11210632775890889e-252 < z < 3.53727166255265831e44Initial program 12.9
rmApplied associate-*l*12.3
if 3.53727166255265831e44 < z Initial program 36.6
Taylor expanded around inf 3.4
Final simplification6.7
herbie shell --seed 2020162
(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) (neg (* 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)))))