\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.63912937841539549499323805785233795264 \cdot 10^{153}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z \le 1.972031711751160647332172966105322255619 \cdot 10^{149}:\\
\;\;\;\;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 r268217 = x;
double r268218 = y;
double r268219 = r268217 * r268218;
double r268220 = z;
double r268221 = r268219 * r268220;
double r268222 = r268220 * r268220;
double r268223 = t;
double r268224 = a;
double r268225 = r268223 * r268224;
double r268226 = r268222 - r268225;
double r268227 = sqrt(r268226);
double r268228 = r268221 / r268227;
return r268228;
}
double f(double x, double y, double z, double t, double a) {
double r268229 = z;
double r268230 = -1.6391293784153955e+153;
bool r268231 = r268229 <= r268230;
double r268232 = y;
double r268233 = x;
double r268234 = r268232 * r268233;
double r268235 = -r268234;
double r268236 = 1.9720317117511606e+149;
bool r268237 = r268229 <= r268236;
double r268238 = r268229 * r268229;
double r268239 = t;
double r268240 = a;
double r268241 = r268239 * r268240;
double r268242 = r268238 - r268241;
double r268243 = sqrt(r268242);
double r268244 = r268243 / r268229;
double r268245 = r268232 / r268244;
double r268246 = r268233 * r268245;
double r268247 = r268237 ? r268246 : r268234;
double r268248 = r268231 ? r268235 : r268247;
return r268248;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.9 |
|---|---|
| Target | 7.5 |
| Herbie | 6.0 |
if z < -1.6391293784153955e+153Initial program 53.6
Taylor expanded around -inf 1.1
Simplified1.1
if -1.6391293784153955e+153 < z < 1.9720317117511606e+149Initial program 10.9
rmApplied associate-/l*8.9
rmApplied *-un-lft-identity8.9
Applied *-un-lft-identity8.9
Applied sqrt-prod8.9
Applied times-frac8.9
Applied times-frac8.3
Simplified8.3
if 1.9720317117511606e+149 < z Initial program 53.6
Taylor expanded around inf 1.1
Simplified1.1
Final simplification6.0
herbie shell --seed 2019304 +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)))))