\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.002837198668899603186184426685314231232 \cdot 10^{60}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \le 3.938152743281577115008790785650092236667 \cdot 10^{96}:\\
\;\;\;\;\frac{x}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}} \cdot \frac{y}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r369841 = x;
double r369842 = y;
double r369843 = r369841 * r369842;
double r369844 = z;
double r369845 = r369843 * r369844;
double r369846 = r369844 * r369844;
double r369847 = t;
double r369848 = a;
double r369849 = r369847 * r369848;
double r369850 = r369846 - r369849;
double r369851 = sqrt(r369850);
double r369852 = r369845 / r369851;
return r369852;
}
double f(double x, double y, double z, double t, double a) {
double r369853 = z;
double r369854 = -1.0028371986688996e+60;
bool r369855 = r369853 <= r369854;
double r369856 = x;
double r369857 = y;
double r369858 = -r369857;
double r369859 = r369856 * r369858;
double r369860 = 3.938152743281577e+96;
bool r369861 = r369853 <= r369860;
double r369862 = r369853 * r369853;
double r369863 = t;
double r369864 = a;
double r369865 = r369863 * r369864;
double r369866 = r369862 - r369865;
double r369867 = sqrt(r369866);
double r369868 = sqrt(r369867);
double r369869 = cbrt(r369853);
double r369870 = r369869 * r369869;
double r369871 = r369868 / r369870;
double r369872 = r369856 / r369871;
double r369873 = r369868 / r369869;
double r369874 = r369857 / r369873;
double r369875 = r369872 * r369874;
double r369876 = r369856 * r369857;
double r369877 = r369861 ? r369875 : r369876;
double r369878 = r369855 ? r369859 : r369877;
return r369878;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.0 |
|---|---|
| Target | 7.9 |
| Herbie | 6.4 |
if z < -1.0028371986688996e+60Initial program 39.0
rmApplied associate-/l*35.9
rmApplied *-un-lft-identity35.9
Applied *-un-lft-identity35.9
Applied sqrt-prod35.9
Applied times-frac35.9
Applied times-frac35.9
Simplified35.9
Taylor expanded around -inf 3.4
Simplified3.4
if -1.0028371986688996e+60 < z < 3.938152743281577e+96Initial program 11.4
rmApplied associate-/l*10.1
rmApplied add-cube-cbrt10.8
Applied add-sqr-sqrt10.8
Applied sqrt-prod10.8
Applied times-frac10.8
Applied times-frac9.1
if 3.938152743281577e+96 < z Initial program 43.9
rmApplied associate-/l*41.1
rmApplied *-un-lft-identity41.1
Applied *-un-lft-identity41.1
Applied sqrt-prod41.1
Applied times-frac41.1
Applied times-frac41.1
Simplified41.1
Taylor expanded around inf 2.7
Final simplification6.4
herbie shell --seed 2019350 +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)))))