\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.4291886083756086 \cdot 10^{+152}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \le 1.0460513044759073 \cdot 10^{+153}:\\
\;\;\;\;\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}} \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r13532766 = x;
double r13532767 = y;
double r13532768 = r13532766 * r13532767;
double r13532769 = z;
double r13532770 = r13532768 * r13532769;
double r13532771 = r13532769 * r13532769;
double r13532772 = t;
double r13532773 = a;
double r13532774 = r13532772 * r13532773;
double r13532775 = r13532771 - r13532774;
double r13532776 = sqrt(r13532775);
double r13532777 = r13532770 / r13532776;
return r13532777;
}
double f(double x, double y, double z, double t, double a) {
double r13532778 = z;
double r13532779 = -1.4291886083756086e+152;
bool r13532780 = r13532778 <= r13532779;
double r13532781 = x;
double r13532782 = y;
double r13532783 = -r13532782;
double r13532784 = r13532781 * r13532783;
double r13532785 = 1.0460513044759073e+153;
bool r13532786 = r13532778 <= r13532785;
double r13532787 = r13532778 * r13532778;
double r13532788 = t;
double r13532789 = a;
double r13532790 = r13532788 * r13532789;
double r13532791 = r13532787 - r13532790;
double r13532792 = sqrt(r13532791);
double r13532793 = r13532778 / r13532792;
double r13532794 = r13532793 * r13532781;
double r13532795 = r13532794 * r13532782;
double r13532796 = r13532781 * r13532782;
double r13532797 = r13532786 ? r13532795 : r13532796;
double r13532798 = r13532780 ? r13532784 : r13532797;
return r13532798;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.7 |
|---|---|
| Target | 7.8 |
| Herbie | 6.2 |
if z < -1.4291886083756086e+152Initial program 53.9
Taylor expanded around -inf 1.0
Simplified1.0
if -1.4291886083756086e+152 < z < 1.0460513044759073e+153Initial program 11.3
rmApplied *-un-lft-identity11.3
Applied sqrt-prod11.3
Applied times-frac9.0
Simplified9.0
rmApplied associate-*l*8.5
if 1.0460513044759073e+153 < z Initial program 54.3
rmApplied *-un-lft-identity54.3
Applied sqrt-prod54.3
Applied times-frac54.3
Simplified54.3
rmApplied div-inv54.3
Taylor expanded around inf 1.5
Final simplification6.2
herbie shell --seed 2019162
(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)))))