\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}:\\
\;\;\;\;-x \cdot y\\
\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}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r253620 = x;
double r253621 = y;
double r253622 = r253620 * r253621;
double r253623 = z;
double r253624 = r253622 * r253623;
double r253625 = r253623 * r253623;
double r253626 = t;
double r253627 = a;
double r253628 = r253626 * r253627;
double r253629 = r253625 - r253628;
double r253630 = sqrt(r253629);
double r253631 = r253624 / r253630;
return r253631;
}
double f(double x, double y, double z, double t, double a) {
double r253632 = z;
double r253633 = -8.271419220344132e+137;
bool r253634 = r253632 <= r253633;
double r253635 = x;
double r253636 = y;
double r253637 = r253635 * r253636;
double r253638 = -r253637;
double r253639 = 6.239560565980057e+82;
bool r253640 = r253632 <= r253639;
double r253641 = 1.0;
double r253642 = r253632 * r253632;
double r253643 = t;
double r253644 = a;
double r253645 = r253643 * r253644;
double r253646 = r253642 - r253645;
double r253647 = sqrt(r253646);
double r253648 = r253647 / r253632;
double r253649 = r253641 / r253648;
double r253650 = r253636 * r253649;
double r253651 = r253635 * r253650;
double r253652 = r253640 ? r253651 : r253637;
double r253653 = r253634 ? r253638 : r253652;
return r253653;
}




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
Final simplification6.4
herbie shell --seed 2019212
(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)))))