\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 r13037826 = x;
double r13037827 = y;
double r13037828 = r13037826 * r13037827;
double r13037829 = z;
double r13037830 = r13037828 * r13037829;
double r13037831 = r13037829 * r13037829;
double r13037832 = t;
double r13037833 = a;
double r13037834 = r13037832 * r13037833;
double r13037835 = r13037831 - r13037834;
double r13037836 = sqrt(r13037835);
double r13037837 = r13037830 / r13037836;
return r13037837;
}
double f(double x, double y, double z, double t, double a) {
double r13037838 = z;
double r13037839 = -1.4291886083756086e+152;
bool r13037840 = r13037838 <= r13037839;
double r13037841 = x;
double r13037842 = y;
double r13037843 = -r13037842;
double r13037844 = r13037841 * r13037843;
double r13037845 = 1.0460513044759073e+153;
bool r13037846 = r13037838 <= r13037845;
double r13037847 = r13037838 * r13037838;
double r13037848 = t;
double r13037849 = a;
double r13037850 = r13037848 * r13037849;
double r13037851 = r13037847 - r13037850;
double r13037852 = sqrt(r13037851);
double r13037853 = r13037838 / r13037852;
double r13037854 = r13037853 * r13037841;
double r13037855 = r13037854 * r13037842;
double r13037856 = r13037841 * r13037842;
double r13037857 = r13037846 ? r13037855 : r13037856;
double r13037858 = r13037840 ? r13037844 : r13037857;
return r13037858;
}




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 associate-*l*54.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)))))