\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -2.58374513121740497 \cdot 10^{153}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \le -1.0822607093553684 \cdot 10^{-157}:\\
\;\;\;\;\left(y \cdot x\right) \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{elif}\;z \le 1.47125863952031322 \cdot 10^{-158}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot z\right)}{\sqrt{z \cdot z - t \cdot a}}\\
\mathbf{elif}\;z \le 1.89951665536892811 \cdot 10^{151}:\\
\;\;\;\;y \cdot \left(x \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 r290770 = x;
double r290771 = y;
double r290772 = r290770 * r290771;
double r290773 = z;
double r290774 = r290772 * r290773;
double r290775 = r290773 * r290773;
double r290776 = t;
double r290777 = a;
double r290778 = r290776 * r290777;
double r290779 = r290775 - r290778;
double r290780 = sqrt(r290779);
double r290781 = r290774 / r290780;
return r290781;
}
double f(double x, double y, double z, double t, double a) {
double r290782 = z;
double r290783 = -2.583745131217405e+153;
bool r290784 = r290782 <= r290783;
double r290785 = y;
double r290786 = x;
double r290787 = -r290786;
double r290788 = r290785 * r290787;
double r290789 = -1.0822607093553684e-157;
bool r290790 = r290782 <= r290789;
double r290791 = r290785 * r290786;
double r290792 = r290782 * r290782;
double r290793 = t;
double r290794 = a;
double r290795 = r290793 * r290794;
double r290796 = r290792 - r290795;
double r290797 = sqrt(r290796);
double r290798 = r290782 / r290797;
double r290799 = r290791 * r290798;
double r290800 = 1.4712586395203132e-158;
bool r290801 = r290782 <= r290800;
double r290802 = r290786 * r290782;
double r290803 = r290785 * r290802;
double r290804 = r290803 / r290797;
double r290805 = 1.899516655368928e+151;
bool r290806 = r290782 <= r290805;
double r290807 = r290786 * r290798;
double r290808 = r290785 * r290807;
double r290809 = r290786 * r290785;
double r290810 = r290806 ? r290808 : r290809;
double r290811 = r290801 ? r290804 : r290810;
double r290812 = r290790 ? r290799 : r290811;
double r290813 = r290784 ? r290788 : r290812;
return r290813;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.3 |
|---|---|
| Target | 7.9 |
| Herbie | 6.2 |
if z < -2.583745131217405e+153Initial program 53.9
rmApplied *-un-lft-identity53.9
Applied sqrt-prod53.9
Applied times-frac53.4
Simplified53.4
rmApplied associate-*l*53.4
Taylor expanded around -inf 1.4
Simplified1.4
if -2.583745131217405e+153 < z < -1.0822607093553684e-157Initial program 8.7
rmApplied *-un-lft-identity8.7
Applied sqrt-prod8.7
Applied times-frac5.1
Simplified5.1
if -1.0822607093553684e-157 < z < 1.4712586395203132e-158Initial program 19.2
rmApplied *-un-lft-identity19.2
Applied sqrt-prod19.2
Applied times-frac20.5
Simplified20.5
rmApplied associate-*l*19.7
rmApplied associate-*r/17.8
Applied associate-*r/18.0
if 1.4712586395203132e-158 < z < 1.899516655368928e+151Initial program 8.7
rmApplied *-un-lft-identity8.7
Applied sqrt-prod8.7
Applied times-frac5.1
Simplified5.1
rmApplied associate-*l*5.1
if 1.899516655368928e+151 < z Initial program 53.1
rmApplied *-un-lft-identity53.1
Applied sqrt-prod53.1
Applied times-frac52.5
Simplified52.5
rmApplied associate-*l*52.5
Taylor expanded around inf 1.3
Final simplification6.2
herbie shell --seed 2019198 +o rules:numerics
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
: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)))))