\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -6.341587143310155927610127187698487770803 \cdot 10^{119}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 1.874715117526437905041862577558668025639 \cdot 10^{146}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r314461 = x;
double r314462 = y;
double r314463 = r314461 * r314462;
double r314464 = z;
double r314465 = r314463 * r314464;
double r314466 = r314464 * r314464;
double r314467 = t;
double r314468 = a;
double r314469 = r314467 * r314468;
double r314470 = r314466 - r314469;
double r314471 = sqrt(r314470);
double r314472 = r314465 / r314471;
return r314472;
}
double f(double x, double y, double z, double t, double a) {
double r314473 = z;
double r314474 = -6.341587143310156e+119;
bool r314475 = r314473 <= r314474;
double r314476 = -1.0;
double r314477 = x;
double r314478 = y;
double r314479 = r314477 * r314478;
double r314480 = r314476 * r314479;
double r314481 = 1.874715117526438e+146;
bool r314482 = r314473 <= r314481;
double r314483 = r314473 * r314473;
double r314484 = t;
double r314485 = a;
double r314486 = r314484 * r314485;
double r314487 = r314483 - r314486;
double r314488 = sqrt(r314487);
double r314489 = r314488 / r314473;
double r314490 = r314478 / r314489;
double r314491 = r314477 * r314490;
double r314492 = r314482 ? r314491 : r314479;
double r314493 = r314475 ? r314480 : r314492;
return r314493;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 25.3 |
|---|---|
| Target | 7.7 |
| Herbie | 6.1 |
if z < -6.341587143310156e+119Initial program 47.4
rmApplied associate-/l*46.0
rmApplied *-un-lft-identity46.0
Applied *-un-lft-identity46.0
Applied sqrt-prod46.0
Applied times-frac46.0
Applied times-frac46.0
Simplified46.0
rmApplied associate-*r/46.0
Taylor expanded around -inf 1.8
if -6.341587143310156e+119 < z < 1.874715117526438e+146Initial program 11.1
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.5
Simplified8.5
if 1.874715117526438e+146 < z Initial program 52.8
Taylor expanded around inf 1.7
Final simplification6.1
herbie shell --seed 2019353
(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)))))