\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -2.6962331905453547 \cdot 10^{153}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \le 2.46792807275296628 \cdot 10^{151}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r216378 = x;
double r216379 = y;
double r216380 = r216378 * r216379;
double r216381 = z;
double r216382 = r216380 * r216381;
double r216383 = r216381 * r216381;
double r216384 = t;
double r216385 = a;
double r216386 = r216384 * r216385;
double r216387 = r216383 - r216386;
double r216388 = sqrt(r216387);
double r216389 = r216382 / r216388;
return r216389;
}
double f(double x, double y, double z, double t, double a) {
double r216390 = z;
double r216391 = -2.6962331905453547e+153;
bool r216392 = r216390 <= r216391;
double r216393 = x;
double r216394 = y;
double r216395 = -r216394;
double r216396 = r216393 * r216395;
double r216397 = 2.4679280727529663e+151;
bool r216398 = r216390 <= r216397;
double r216399 = r216390 * r216390;
double r216400 = t;
double r216401 = a;
double r216402 = r216400 * r216401;
double r216403 = r216399 - r216402;
double r216404 = sqrt(r216403);
double r216405 = r216390 / r216404;
double r216406 = r216394 * r216405;
double r216407 = r216393 * r216406;
double r216408 = r216393 * r216394;
double r216409 = r216398 ? r216407 : r216408;
double r216410 = r216392 ? r216396 : r216409;
return r216410;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.3 |
|---|---|
| Target | 7.9 |
| Herbie | 6.4 |
if z < -2.6962331905453547e+153Initial program 53.9
rmApplied *-un-lft-identity53.9
Applied sqrt-prod53.9
Applied times-frac53.4
Simplified53.4
rmApplied associate-*l*53.4
Taylor expanded around -inf 1.4
Simplified1.4
if -2.6962331905453547e+153 < z < 2.4679280727529663e+151Initial program 11.3
rmApplied *-un-lft-identity11.3
Applied sqrt-prod11.3
Applied times-frac9.0
Simplified9.0
rmApplied associate-*l*8.6
if 2.4679280727529663e+151 < z Initial program 53.1
rmApplied *-un-lft-identity53.1
Applied sqrt-prod53.1
Applied times-frac52.5
Simplified52.5
rmApplied associate-*l*52.5
Taylor expanded around inf 1.3
Final simplification6.4
herbie shell --seed 2019198
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
: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)))))