\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}:\\
\;\;\;\;x \cdot \left(-1 \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 r323100 = x;
double r323101 = y;
double r323102 = r323100 * r323101;
double r323103 = z;
double r323104 = r323102 * r323103;
double r323105 = r323103 * r323103;
double r323106 = t;
double r323107 = a;
double r323108 = r323106 * r323107;
double r323109 = r323105 - r323108;
double r323110 = sqrt(r323109);
double r323111 = r323104 / r323110;
return r323111;
}
double f(double x, double y, double z, double t, double a) {
double r323112 = z;
double r323113 = -1.3433926726132482e+154;
bool r323114 = r323112 <= r323113;
double r323115 = x;
double r323116 = -1.0;
double r323117 = y;
double r323118 = r323116 * r323117;
double r323119 = r323115 * r323118;
double r323120 = 1.340662233520948e+50;
bool r323121 = r323112 <= r323120;
double r323122 = r323112 * r323112;
double r323123 = t;
double r323124 = a;
double r323125 = r323123 * r323124;
double r323126 = r323122 - r323125;
double r323127 = sqrt(r323126);
double r323128 = r323112 / r323127;
double r323129 = r323117 * r323128;
double r323130 = r323115 * r323129;
double r323131 = r323115 * r323117;
double r323132 = r323121 ? r323130 : r323131;
double r323133 = r323114 ? r323119 : r323132;
return r323133;
}




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
rmApplied *-un-lft-identity54.0
Applied sqrt-prod54.0
Applied times-frac53.6
Simplified53.6
rmApplied associate-*l*53.6
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
Taylor expanded around inf 4.0
Final simplification6.3
herbie shell --seed 2020018
(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)))))