\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -3.6721891600828564 \cdot 10^{151}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 5.32450332568295542 \cdot 10^{121}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 1\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r299860 = x;
double r299861 = y;
double r299862 = r299860 * r299861;
double r299863 = z;
double r299864 = r299862 * r299863;
double r299865 = r299863 * r299863;
double r299866 = t;
double r299867 = a;
double r299868 = r299866 * r299867;
double r299869 = r299865 - r299868;
double r299870 = sqrt(r299869);
double r299871 = r299864 / r299870;
return r299871;
}
double f(double x, double y, double z, double t, double a) {
double r299872 = z;
double r299873 = -3.6721891600828564e+151;
bool r299874 = r299872 <= r299873;
double r299875 = -1.0;
double r299876 = x;
double r299877 = y;
double r299878 = r299876 * r299877;
double r299879 = r299875 * r299878;
double r299880 = 5.324503325682955e+121;
bool r299881 = r299872 <= r299880;
double r299882 = r299872 * r299872;
double r299883 = t;
double r299884 = a;
double r299885 = r299883 * r299884;
double r299886 = r299882 - r299885;
double r299887 = sqrt(r299886);
double r299888 = r299872 / r299887;
double r299889 = r299877 * r299888;
double r299890 = r299876 * r299889;
double r299891 = 1.0;
double r299892 = r299878 * r299891;
double r299893 = r299881 ? r299890 : r299892;
double r299894 = r299874 ? r299879 : r299893;
return r299894;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.5 |
|---|---|
| Target | 7.5 |
| Herbie | 6.3 |
if z < -3.6721891600828564e+151Initial program 52.8
rmApplied *-un-lft-identity52.8
Applied sqrt-prod52.8
Applied times-frac52.3
Simplified52.3
rmApplied associate-*l*52.3
Taylor expanded around -inf 1.1
if -3.6721891600828564e+151 < z < 5.324503325682955e+121Initial program 10.9
rmApplied *-un-lft-identity10.9
Applied sqrt-prod10.9
Applied times-frac8.8
Simplified8.8
rmApplied associate-*l*8.9
if 5.324503325682955e+121 < z Initial program 47.0
rmApplied *-un-lft-identity47.0
Applied sqrt-prod47.0
Applied times-frac44.7
Simplified44.7
Taylor expanded around inf 1.5
Final simplification6.3
herbie shell --seed 2020089 +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)))))