\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -6.341587143310155927610127187698487770803 \cdot 10^{119}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 1.874715117526437905041862577558668025639 \cdot 10^{146}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r295929 = x;
double r295930 = y;
double r295931 = r295929 * r295930;
double r295932 = z;
double r295933 = r295931 * r295932;
double r295934 = r295932 * r295932;
double r295935 = t;
double r295936 = a;
double r295937 = r295935 * r295936;
double r295938 = r295934 - r295937;
double r295939 = sqrt(r295938);
double r295940 = r295933 / r295939;
return r295940;
}
double f(double x, double y, double z, double t, double a) {
double r295941 = z;
double r295942 = -6.341587143310156e+119;
bool r295943 = r295941 <= r295942;
double r295944 = -1.0;
double r295945 = x;
double r295946 = y;
double r295947 = r295945 * r295946;
double r295948 = r295944 * r295947;
double r295949 = 1.874715117526438e+146;
bool r295950 = r295941 <= r295949;
double r295951 = r295941 * r295941;
double r295952 = t;
double r295953 = a;
double r295954 = r295952 * r295953;
double r295955 = r295951 - r295954;
double r295956 = sqrt(r295955);
double r295957 = r295956 / r295941;
double r295958 = r295946 / r295957;
double r295959 = r295945 * r295958;
double r295960 = r295950 ? r295959 : r295947;
double r295961 = r295943 ? r295948 : r295960;
return r295961;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.3 |
|---|---|
| Target | 7.7 |
| Herbie | 6.1 |
if z < -6.341587143310156e+119Initial program 47.4
Taylor expanded around -inf 1.8
if -6.341587143310156e+119 < z < 1.874715117526438e+146Initial program 11.1
rmApplied associate-/l*8.9
rmApplied *-un-lft-identity8.9
Applied *-un-lft-identity8.9
Applied sqrt-prod8.9
Applied times-frac8.9
Applied times-frac8.5
Simplified8.5
if 1.874715117526438e+146 < z Initial program 52.8
Taylor expanded around inf 1.7
Final simplification6.1
herbie shell --seed 2019353 +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)))))