\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.21372963348103654 \cdot 10^{154}:\\
\;\;\;\;x \cdot \left(-1 \cdot y\right)\\
\mathbf{elif}\;z \le 8.84000957203954817 \cdot 10^{95}:\\
\;\;\;\;x \cdot \left(y \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 r273955 = x;
double r273956 = y;
double r273957 = r273955 * r273956;
double r273958 = z;
double r273959 = r273957 * r273958;
double r273960 = r273958 * r273958;
double r273961 = t;
double r273962 = a;
double r273963 = r273961 * r273962;
double r273964 = r273960 - r273963;
double r273965 = sqrt(r273964);
double r273966 = r273959 / r273965;
return r273966;
}
double f(double x, double y, double z, double t, double a) {
double r273967 = z;
double r273968 = -1.2137296334810365e+154;
bool r273969 = r273967 <= r273968;
double r273970 = x;
double r273971 = -1.0;
double r273972 = y;
double r273973 = r273971 * r273972;
double r273974 = r273970 * r273973;
double r273975 = 8.840009572039548e+95;
bool r273976 = r273967 <= r273975;
double r273977 = r273967 * r273967;
double r273978 = t;
double r273979 = a;
double r273980 = r273978 * r273979;
double r273981 = r273977 - r273980;
double r273982 = sqrt(r273981);
double r273983 = r273967 / r273982;
double r273984 = r273972 * r273983;
double r273985 = r273970 * r273984;
double r273986 = r273970 * r273972;
double r273987 = r273976 ? r273985 : r273986;
double r273988 = r273969 ? r273974 : r273987;
return r273988;
}




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 | 8.0 |
| Herbie | 6.6 |
if z < -1.2137296334810365e+154Initial program 54.5
rmApplied *-un-lft-identity54.5
Applied sqrt-prod54.5
Applied times-frac54.1
Simplified54.1
rmApplied associate-*l*54.1
Taylor expanded around -inf 1.7
if -1.2137296334810365e+154 < z < 8.840009572039548e+95Initial program 10.8
rmApplied *-un-lft-identity10.8
Applied sqrt-prod10.8
Applied times-frac8.8
Simplified8.8
rmApplied associate-*l*9.0
if 8.840009572039548e+95 < z Initial program 43.1
rmApplied *-un-lft-identity43.1
Applied sqrt-prod43.1
Applied times-frac39.9
Simplified39.9
rmApplied associate-*l*40.0
Taylor expanded around inf 3.0
Final simplification6.6
herbie shell --seed 2020047
(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)))))