\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.809372504935346 \cdot 10^{74}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 1.63879346091278812 \cdot 10^{75}:\\
\;\;\;\;\frac{x \cdot y}{\sqrt{\sqrt{z \cdot z - t \cdot a}}} \cdot \frac{z}{\sqrt{\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.809372504935346e+74)) {
VAR = ((double) (-1.0 * ((double) (x * y))));
} else {
double VAR_1;
if ((z <= 1.6387934609127881e+75)) {
VAR_1 = ((double) (((double) (((double) (x * y)) / ((double) sqrt(((double) sqrt(((double) (((double) (z * z)) - ((double) (t * a)))))))))) * ((double) (z / ((double) sqrt(((double) sqrt(((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 | 24.6 |
|---|---|
| Target | 7.4 |
| Herbie | 6.7 |
if z < -1.809372504935346e74Initial program 40.0
Taylor expanded around -inf 2.9
if -1.809372504935346e74 < z < 1.63879346091278812e75Initial program 11.0
rmApplied add-sqr-sqrt11.0
Applied sqrt-prod11.2
Applied times-frac10.4
if 1.63879346091278812e75 < z Initial program 40.2
Taylor expanded around inf 2.0
Final simplification6.7
herbie shell --seed 2020173
(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)))))