\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.314671456108926512082813208950851125606 \cdot 10^{154}:\\
\;\;\;\;\left(-x\right) \cdot y\\
\mathbf{elif}\;z \le 3.742227003601956059846046304592741853886 \cdot 10^{96}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r182839 = x;
double r182840 = y;
double r182841 = r182839 * r182840;
double r182842 = z;
double r182843 = r182841 * r182842;
double r182844 = r182842 * r182842;
double r182845 = t;
double r182846 = a;
double r182847 = r182845 * r182846;
double r182848 = r182844 - r182847;
double r182849 = sqrt(r182848);
double r182850 = r182843 / r182849;
return r182850;
}
double f(double x, double y, double z, double t, double a) {
double r182851 = z;
double r182852 = -1.3146714561089265e+154;
bool r182853 = r182851 <= r182852;
double r182854 = x;
double r182855 = -r182854;
double r182856 = y;
double r182857 = r182855 * r182856;
double r182858 = 3.742227003601956e+96;
bool r182859 = r182851 <= r182858;
double r182860 = r182851 * r182851;
double r182861 = t;
double r182862 = a;
double r182863 = r182861 * r182862;
double r182864 = r182860 - r182863;
double r182865 = sqrt(r182864);
double r182866 = r182851 / r182865;
double r182867 = r182854 * r182866;
double r182868 = r182856 * r182867;
double r182869 = r182856 * r182854;
double r182870 = r182859 ? r182868 : r182869;
double r182871 = r182853 ? r182857 : r182870;
return r182871;
}




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 | 8.2 |
| Herbie | 6.6 |
if z < -1.3146714561089265e+154Initial program 54.6
rmApplied *-un-lft-identity54.6
Applied sqrt-prod54.6
Applied times-frac54.2
Simplified54.2
rmApplied fma-neg54.2
Simplified54.2
Taylor expanded around -inf 1.6
Simplified1.6
if -1.3146714561089265e+154 < z < 3.742227003601956e+96Initial program 11.4
rmApplied *-un-lft-identity11.4
Applied sqrt-prod11.4
Applied times-frac9.4
Simplified9.4
rmApplied associate-*l*9.3
if 3.742227003601956e+96 < z Initial program 43.5
rmApplied *-un-lft-identity43.5
Applied sqrt-prod43.5
Applied times-frac41.2
Simplified41.2
rmApplied associate-*l*41.2
Taylor expanded around inf 2.4
Final simplification6.6
herbie shell --seed 2019235 +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.1921305903852764e46) (- (* y x)) (if (< z 5.9762681209208942e90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))