\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.387037513954152204793629697523518119099 \cdot 10^{152}:\\
\;\;\;\;\frac{x \cdot y}{-1}\\
\mathbf{elif}\;z \le 2.81109844001032311849514459419925746028 \cdot 10^{123}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r221844 = x;
double r221845 = y;
double r221846 = r221844 * r221845;
double r221847 = z;
double r221848 = r221846 * r221847;
double r221849 = r221847 * r221847;
double r221850 = t;
double r221851 = a;
double r221852 = r221850 * r221851;
double r221853 = r221849 - r221852;
double r221854 = sqrt(r221853);
double r221855 = r221848 / r221854;
return r221855;
}
double f(double x, double y, double z, double t, double a) {
double r221856 = z;
double r221857 = -1.3870375139541522e+152;
bool r221858 = r221856 <= r221857;
double r221859 = x;
double r221860 = y;
double r221861 = r221859 * r221860;
double r221862 = -1.0;
double r221863 = r221861 / r221862;
double r221864 = 2.811098440010323e+123;
bool r221865 = r221856 <= r221864;
double r221866 = r221856 * r221856;
double r221867 = t;
double r221868 = a;
double r221869 = r221867 * r221868;
double r221870 = r221866 - r221869;
double r221871 = sqrt(r221870);
double r221872 = r221871 / r221856;
double r221873 = r221860 / r221872;
double r221874 = r221859 * r221873;
double r221875 = r221860 * r221859;
double r221876 = r221865 ? r221874 : r221875;
double r221877 = r221858 ? r221863 : r221876;
return r221877;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.4 |
|---|---|
| Target | 7.5 |
| Herbie | 6.1 |
if z < -1.3870375139541522e+152Initial program 52.5
rmApplied associate-/l*52.1
rmApplied clear-num52.1
Taylor expanded around -inf 1.5
if -1.3870375139541522e+152 < z < 2.811098440010323e+123Initial program 10.7
rmApplied associate-/l*8.7
rmApplied *-un-lft-identity8.7
Applied *-un-lft-identity8.7
Applied sqrt-prod8.7
Applied times-frac8.7
Applied times-frac8.5
Simplified8.5
if 2.811098440010323e+123 < z Initial program 47.9
rmApplied associate-/l*45.9
rmApplied clear-num45.9
Taylor expanded around inf 1.7
Simplified1.7
Final simplification6.1
herbie shell --seed 2019325
(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)))))