\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -5.199714169449318426725790466332778930458 \cdot 10^{116}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \le 2.818827562843424905673562246640834606804 \cdot 10^{156}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r335169 = x;
double r335170 = y;
double r335171 = r335169 * r335170;
double r335172 = z;
double r335173 = r335171 * r335172;
double r335174 = r335172 * r335172;
double r335175 = t;
double r335176 = a;
double r335177 = r335175 * r335176;
double r335178 = r335174 - r335177;
double r335179 = sqrt(r335178);
double r335180 = r335173 / r335179;
return r335180;
}
double f(double x, double y, double z, double t, double a) {
double r335181 = z;
double r335182 = -5.1997141694493184e+116;
bool r335183 = r335181 <= r335182;
double r335184 = y;
double r335185 = x;
double r335186 = -r335185;
double r335187 = r335184 * r335186;
double r335188 = 2.818827562843425e+156;
bool r335189 = r335181 <= r335188;
double r335190 = r335181 * r335181;
double r335191 = t;
double r335192 = a;
double r335193 = r335191 * r335192;
double r335194 = r335190 - r335193;
double r335195 = sqrt(r335194);
double r335196 = r335181 / r335195;
double r335197 = r335185 * r335196;
double r335198 = r335184 * r335197;
double r335199 = r335184 * r335185;
double r335200 = r335189 ? r335198 : r335199;
double r335201 = r335183 ? r335187 : r335200;
return r335201;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.1 |
|---|---|
| Target | 7.5 |
| Herbie | 6.1 |
if z < -5.1997141694493184e+116Initial program 47.7
rmApplied *-un-lft-identity47.7
Applied sqrt-prod47.7
Applied times-frac45.7
Simplified45.7
rmApplied associate-*l*45.7
Taylor expanded around -inf 1.7
Simplified1.7
if -5.1997141694493184e+116 < z < 2.818827562843425e+156Initial program 10.9
rmApplied *-un-lft-identity10.9
Applied sqrt-prod10.9
Applied times-frac8.7
Simplified8.7
rmApplied associate-*l*8.6
if 2.818827562843425e+156 < z Initial program 54.8
rmApplied *-un-lft-identity54.8
Applied sqrt-prod54.8
Applied times-frac54.4
Simplified54.4
rmApplied associate-*l*54.4
Taylor expanded around inf 1.3
Final simplification6.1
herbie shell --seed 2019322 +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)))))