\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.0932223177976295 \cdot 10^{154}:\\
\;\;\;\;\left(x \cdot y\right) \cdot -1\\
\mathbf{elif}\;z \le 3.43469549411492992 \cdot 10^{83}:\\
\;\;\;\;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 r274455 = x;
double r274456 = y;
double r274457 = r274455 * r274456;
double r274458 = z;
double r274459 = r274457 * r274458;
double r274460 = r274458 * r274458;
double r274461 = t;
double r274462 = a;
double r274463 = r274461 * r274462;
double r274464 = r274460 - r274463;
double r274465 = sqrt(r274464);
double r274466 = r274459 / r274465;
return r274466;
}
double f(double x, double y, double z, double t, double a) {
double r274467 = z;
double r274468 = -1.0932223177976295e+154;
bool r274469 = r274467 <= r274468;
double r274470 = x;
double r274471 = y;
double r274472 = r274470 * r274471;
double r274473 = -1.0;
double r274474 = r274472 * r274473;
double r274475 = 3.43469549411493e+83;
bool r274476 = r274467 <= r274475;
double r274477 = r274467 * r274467;
double r274478 = t;
double r274479 = a;
double r274480 = r274478 * r274479;
double r274481 = r274477 - r274480;
double r274482 = sqrt(r274481);
double r274483 = r274467 / r274482;
double r274484 = r274471 * r274483;
double r274485 = r274470 * r274484;
double r274486 = r274476 ? r274485 : r274472;
double r274487 = r274469 ? r274474 : r274486;
return r274487;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.5 |
|---|---|
| Target | 7.3 |
| Herbie | 5.8 |
if z < -1.0932223177976295e+154Initial program 54.4
rmApplied *-un-lft-identity54.4
Applied sqrt-prod54.4
Applied times-frac54.0
Simplified54.0
Taylor expanded around -inf 1.5
if -1.0932223177976295e+154 < z < 3.43469549411493e+83Initial program 10.6
rmApplied *-un-lft-identity10.6
Applied sqrt-prod10.6
Applied times-frac8.3
Simplified8.3
rmApplied associate-*l*8.1
if 3.43469549411493e+83 < z Initial program 42.2
rmApplied *-un-lft-identity42.2
Applied sqrt-prod42.2
Applied times-frac39.7
Simplified39.7
rmApplied associate-*l*39.7
Taylor expanded around inf 2.6
Final simplification5.8
herbie shell --seed 2020036
(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)))))