\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -3.0286624309368284 \cdot 10^{146}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 2.6367843017119099 \cdot 10^{123}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 1\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r318751 = x;
double r318752 = y;
double r318753 = r318751 * r318752;
double r318754 = z;
double r318755 = r318753 * r318754;
double r318756 = r318754 * r318754;
double r318757 = t;
double r318758 = a;
double r318759 = r318757 * r318758;
double r318760 = r318756 - r318759;
double r318761 = sqrt(r318760);
double r318762 = r318755 / r318761;
return r318762;
}
double f(double x, double y, double z, double t, double a) {
double r318763 = z;
double r318764 = -3.0286624309368284e+146;
bool r318765 = r318763 <= r318764;
double r318766 = -1.0;
double r318767 = x;
double r318768 = y;
double r318769 = r318767 * r318768;
double r318770 = r318766 * r318769;
double r318771 = 2.63678430171191e+123;
bool r318772 = r318763 <= r318771;
double r318773 = r318763 * r318763;
double r318774 = t;
double r318775 = a;
double r318776 = r318774 * r318775;
double r318777 = r318773 - r318776;
double r318778 = sqrt(r318777);
double r318779 = r318778 / r318763;
double r318780 = r318768 / r318779;
double r318781 = r318767 * r318780;
double r318782 = 1.0;
double r318783 = r318769 * r318782;
double r318784 = r318772 ? r318781 : r318783;
double r318785 = r318765 ? r318770 : r318784;
return r318785;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.0 |
|---|---|
| Target | 8.0 |
| Herbie | 6.1 |
if z < -3.0286624309368284e+146Initial program 52.7
Taylor expanded around -inf 1.5
if -3.0286624309368284e+146 < z < 2.63678430171191e+123Initial program 11.2
rmApplied associate-/l*9.0
rmApplied *-un-lft-identity9.0
Applied *-un-lft-identity9.0
Applied sqrt-prod9.0
Applied times-frac9.0
Applied times-frac8.5
Simplified8.5
if 2.63678430171191e+123 < z Initial program 48.7
rmApplied *-un-lft-identity48.7
Applied sqrt-prod48.7
Applied times-frac46.9
Simplified46.9
Taylor expanded around inf 1.4
Final simplification6.1
herbie shell --seed 2020027 +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.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)))))