\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.3433926726132482 \cdot 10^{154}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 1.34066223352094801 \cdot 10^{50}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r220663 = x;
double r220664 = y;
double r220665 = r220663 * r220664;
double r220666 = z;
double r220667 = r220665 * r220666;
double r220668 = r220666 * r220666;
double r220669 = t;
double r220670 = a;
double r220671 = r220669 * r220670;
double r220672 = r220668 - r220671;
double r220673 = sqrt(r220672);
double r220674 = r220667 / r220673;
return r220674;
}
double f(double x, double y, double z, double t, double a) {
double r220675 = z;
double r220676 = -1.3433926726132482e+154;
bool r220677 = r220675 <= r220676;
double r220678 = -1.0;
double r220679 = x;
double r220680 = y;
double r220681 = r220679 * r220680;
double r220682 = r220678 * r220681;
double r220683 = 1.340662233520948e+50;
bool r220684 = r220675 <= r220683;
double r220685 = r220675 * r220675;
double r220686 = t;
double r220687 = a;
double r220688 = r220686 * r220687;
double r220689 = r220685 - r220688;
double r220690 = sqrt(r220689);
double r220691 = r220675 / r220690;
double r220692 = r220680 * r220691;
double r220693 = r220679 * r220692;
double r220694 = r220684 ? r220693 : r220681;
double r220695 = r220677 ? r220682 : r220694;
return r220695;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.8 |
|---|---|
| Target | 7.5 |
| Herbie | 6.3 |
if z < -1.3433926726132482e+154Initial program 54.0
Taylor expanded around -inf 1.0
if -1.3433926726132482e+154 < z < 1.340662233520948e+50Initial program 11.4
rmApplied *-un-lft-identity11.4
Applied sqrt-prod11.4
Applied times-frac9.5
Simplified9.5
rmApplied associate-*l*8.7
if 1.340662233520948e+50 < z Initial program 37.2
rmApplied *-un-lft-identity37.2
Applied sqrt-prod37.2
Applied times-frac34.1
Simplified34.1
rmApplied associate-*l*34.2
Taylor expanded around inf 4.0
Final simplification6.3
herbie shell --seed 2020018 +o rules:numerics
(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)))))