\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -5.120105105042646 \cdot 10^{65}:\\
\;\;\;\;-x \cdot y\\
\mathbf{elif}\;z \le 1.1249031597052721 \cdot 10^{148}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt{\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 r307939 = x;
double r307940 = y;
double r307941 = r307939 * r307940;
double r307942 = z;
double r307943 = r307941 * r307942;
double r307944 = r307942 * r307942;
double r307945 = t;
double r307946 = a;
double r307947 = r307945 * r307946;
double r307948 = r307944 - r307947;
double r307949 = sqrt(r307948);
double r307950 = r307943 / r307949;
return r307950;
}
double f(double x, double y, double z, double t, double a) {
double r307951 = z;
double r307952 = -5.1201051050426465e+65;
bool r307953 = r307951 <= r307952;
double r307954 = x;
double r307955 = y;
double r307956 = r307954 * r307955;
double r307957 = -r307956;
double r307958 = 1.124903159705272e+148;
bool r307959 = r307951 <= r307958;
double r307960 = r307951 * r307951;
double r307961 = t;
double r307962 = a;
double r307963 = r307961 * r307962;
double r307964 = r307960 - r307963;
double r307965 = sqrt(r307964);
double r307966 = sqrt(r307965);
double r307967 = r307966 * r307966;
double r307968 = r307951 / r307967;
double r307969 = r307955 * r307968;
double r307970 = r307954 * r307969;
double r307971 = r307959 ? r307970 : r307956;
double r307972 = r307953 ? r307957 : r307971;
return r307972;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.2 |
|---|---|
| Target | 7.7 |
| Herbie | 6.5 |
if z < -5.1201051050426465e+65Initial program 39.4
rmApplied *-un-lft-identity39.4
Applied sqrt-prod39.4
Applied times-frac36.6
Simplified36.6
Taylor expanded around -inf 2.9
if -5.1201051050426465e+65 < z < 1.124903159705272e+148Initial program 11.2
rmApplied *-un-lft-identity11.2
Applied sqrt-prod11.2
Applied times-frac9.5
Simplified9.5
rmApplied associate-*l*9.1
rmApplied add-cube-cbrt9.5
rmApplied add-sqr-sqrt9.6
Simplified9.4
Simplified9.3
if 1.124903159705272e+148 < z Initial program 51.6
rmApplied *-un-lft-identity51.6
Applied sqrt-prod51.6
Applied times-frac51.0
Simplified51.0
Taylor expanded around inf 1.2
Final simplification6.5
herbie shell --seed 2020045 +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)))))