\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.946183083718863474818276422295884963474 \cdot 10^{77}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z \le 1.132986739591150831053019488325308932922 \cdot 10^{-234}:\\
\;\;\;\;\left(\left(x \cdot y\right) \cdot z\right) \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{elif}\;z \le 9.94290835006487306171241040296170532934 \cdot 10^{94}:\\
\;\;\;\;y \cdot \left(x \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 r337918 = x;
double r337919 = y;
double r337920 = r337918 * r337919;
double r337921 = z;
double r337922 = r337920 * r337921;
double r337923 = r337921 * r337921;
double r337924 = t;
double r337925 = a;
double r337926 = r337924 * r337925;
double r337927 = r337923 - r337926;
double r337928 = sqrt(r337927);
double r337929 = r337922 / r337928;
return r337929;
}
double f(double x, double y, double z, double t, double a) {
double r337930 = z;
double r337931 = -1.9461830837188635e+77;
bool r337932 = r337930 <= r337931;
double r337933 = y;
double r337934 = x;
double r337935 = r337933 * r337934;
double r337936 = -r337935;
double r337937 = 1.1329867395911508e-234;
bool r337938 = r337930 <= r337937;
double r337939 = r337934 * r337933;
double r337940 = r337939 * r337930;
double r337941 = 1.0;
double r337942 = r337930 * r337930;
double r337943 = t;
double r337944 = a;
double r337945 = r337943 * r337944;
double r337946 = r337942 - r337945;
double r337947 = sqrt(r337946);
double r337948 = r337941 / r337947;
double r337949 = r337940 * r337948;
double r337950 = 9.942908350064873e+94;
bool r337951 = r337930 <= r337950;
double r337952 = r337930 / r337947;
double r337953 = r337934 * r337952;
double r337954 = r337933 * r337953;
double r337955 = r337951 ? r337954 : r337939;
double r337956 = r337938 ? r337949 : r337955;
double r337957 = r337932 ? r337936 : r337956;
return r337957;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.3 |
|---|---|
| Target | 7.2 |
| Herbie | 6.1 |
if z < -1.9461830837188635e+77Initial program 40.2
rmApplied *-un-lft-identity40.2
Applied sqrt-prod40.2
Applied times-frac37.7
Simplified37.7
Taylor expanded around -inf 2.4
if -1.9461830837188635e+77 < z < 1.1329867395911508e-234Initial program 11.2
rmApplied div-inv11.3
if 1.1329867395911508e-234 < z < 9.942908350064873e+94Initial program 9.1
rmApplied *-un-lft-identity9.1
Applied sqrt-prod9.1
Applied times-frac7.0
Simplified7.0
rmApplied associate-*l*6.7
if 9.942908350064873e+94 < z Initial program 43.2
rmApplied *-un-lft-identity43.2
Applied sqrt-prod43.2
Applied times-frac40.7
Simplified40.7
rmApplied associate-*l*40.6
Taylor expanded around inf 2.2
Final simplification6.1
herbie shell --seed 2019351 +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)))))