\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -8.6183547901220424 \cdot 10^{153}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \le 6.9260668882011419 \cdot 10^{147}:\\
\;\;\;\;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 r293891 = x;
double r293892 = y;
double r293893 = r293891 * r293892;
double r293894 = z;
double r293895 = r293893 * r293894;
double r293896 = r293894 * r293894;
double r293897 = t;
double r293898 = a;
double r293899 = r293897 * r293898;
double r293900 = r293896 - r293899;
double r293901 = sqrt(r293900);
double r293902 = r293895 / r293901;
return r293902;
}
double f(double x, double y, double z, double t, double a) {
double r293903 = z;
double r293904 = -8.618354790122042e+153;
bool r293905 = r293903 <= r293904;
double r293906 = x;
double r293907 = y;
double r293908 = -r293907;
double r293909 = r293906 * r293908;
double r293910 = 6.926066888201142e+147;
bool r293911 = r293903 <= r293910;
double r293912 = r293903 * r293903;
double r293913 = t;
double r293914 = a;
double r293915 = r293913 * r293914;
double r293916 = r293912 - r293915;
double r293917 = sqrt(r293916);
double r293918 = r293917 / r293903;
double r293919 = r293907 / r293918;
double r293920 = r293906 * r293919;
double r293921 = r293906 * r293907;
double r293922 = r293911 ? r293920 : r293921;
double r293923 = r293905 ? r293909 : r293922;
return r293923;
}




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.2 |
if z < -8.618354790122042e+153Initial program 54.0
rmApplied associate-/l*53.6
rmApplied *-un-lft-identity53.6
Applied *-un-lft-identity53.6
Applied sqrt-prod53.6
Applied times-frac53.6
Applied times-frac53.6
Simplified53.6
Taylor expanded around -inf 1.1
Simplified1.1
if -8.618354790122042e+153 < z < 6.926066888201142e+147Initial program 11.2
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.6
Simplified8.6
if 6.926066888201142e+147 < z Initial program 51.6
Taylor expanded around inf 1.2
Final simplification6.2
herbie shell --seed 2020045
(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)))))