\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -8.271419220344132473449011043748253490608 \cdot 10^{137}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z \le 6.239560565980056845688368913673998851268 \cdot 10^{82}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{1}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r216747 = x;
double r216748 = y;
double r216749 = r216747 * r216748;
double r216750 = z;
double r216751 = r216749 * r216750;
double r216752 = r216750 * r216750;
double r216753 = t;
double r216754 = a;
double r216755 = r216753 * r216754;
double r216756 = r216752 - r216755;
double r216757 = sqrt(r216756);
double r216758 = r216751 / r216757;
return r216758;
}
double f(double x, double y, double z, double t, double a) {
double r216759 = z;
double r216760 = -8.271419220344132e+137;
bool r216761 = r216759 <= r216760;
double r216762 = y;
double r216763 = x;
double r216764 = r216762 * r216763;
double r216765 = -r216764;
double r216766 = 6.239560565980057e+82;
bool r216767 = r216759 <= r216766;
double r216768 = 1.0;
double r216769 = r216759 * r216759;
double r216770 = t;
double r216771 = a;
double r216772 = r216770 * r216771;
double r216773 = r216769 - r216772;
double r216774 = sqrt(r216773);
double r216775 = r216774 / r216759;
double r216776 = r216768 / r216775;
double r216777 = r216762 * r216776;
double r216778 = r216763 * r216777;
double r216779 = r216767 ? r216778 : r216764;
double r216780 = r216761 ? r216765 : r216779;
return r216780;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.8 |
|---|---|
| Target | 7.7 |
| Herbie | 6.4 |
if z < -8.271419220344132e+137Initial program 50.0
Taylor expanded around -inf 1.8
Simplified1.8
if -8.271419220344132e+137 < z < 6.239560565980057e+82Initial program 10.8
rmApplied associate-/l*9.3
rmApplied *-un-lft-identity9.3
Applied *-un-lft-identity9.3
Applied sqrt-prod9.3
Applied times-frac9.3
Applied times-frac9.1
Simplified9.1
rmApplied div-inv9.1
if 6.239560565980057e+82 < z Initial program 42.5
Taylor expanded around inf 2.5
Simplified2.5
Final simplification6.4
herbie shell --seed 2019212 +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)))))