\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.1125528044552557 \cdot 10^{144}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 1.09631820124514439 \cdot 10^{69}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{\frac{z}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 1\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r294801 = x;
double r294802 = y;
double r294803 = r294801 * r294802;
double r294804 = z;
double r294805 = r294803 * r294804;
double r294806 = r294804 * r294804;
double r294807 = t;
double r294808 = a;
double r294809 = r294807 * r294808;
double r294810 = r294806 - r294809;
double r294811 = sqrt(r294810);
double r294812 = r294805 / r294811;
return r294812;
}
double f(double x, double y, double z, double t, double a) {
double r294813 = z;
double r294814 = -1.1125528044552557e+144;
bool r294815 = r294813 <= r294814;
double r294816 = -1.0;
double r294817 = x;
double r294818 = y;
double r294819 = r294817 * r294818;
double r294820 = r294816 * r294819;
double r294821 = 1.0963182012451444e+69;
bool r294822 = r294813 <= r294821;
double r294823 = r294813 * r294813;
double r294824 = t;
double r294825 = a;
double r294826 = r294824 * r294825;
double r294827 = r294823 - r294826;
double r294828 = sqrt(r294827);
double r294829 = sqrt(r294828);
double r294830 = r294813 / r294829;
double r294831 = r294830 / r294829;
double r294832 = r294819 * r294831;
double r294833 = 1.0;
double r294834 = r294819 * r294833;
double r294835 = r294822 ? r294832 : r294834;
double r294836 = r294815 ? r294820 : r294835;
return r294836;
}




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.8 |
| Herbie | 6.5 |
if z < -1.1125528044552557e+144Initial program 51.4
rmApplied *-un-lft-identity51.4
Applied sqrt-prod51.4
Applied times-frac50.5
Simplified50.5
rmApplied clear-num50.5
Taylor expanded around -inf 1.4
if -1.1125528044552557e+144 < z < 1.0963182012451444e+69Initial program 10.9
rmApplied *-un-lft-identity10.9
Applied sqrt-prod10.9
Applied times-frac8.9
Simplified8.9
rmApplied add-sqr-sqrt8.9
Applied sqrt-prod9.2
Applied associate-/r*9.2
if 1.0963182012451444e+69 < z Initial program 39.2
rmApplied *-un-lft-identity39.2
Applied sqrt-prod39.2
Applied times-frac36.7
Simplified36.7
rmApplied clear-num36.7
Taylor expanded around inf 2.9
Final simplification6.5
herbie shell --seed 2020035 +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)))))