\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.340135447098756276910591543614756155713 \cdot 10^{154}:\\
\;\;\;\;-x \cdot y\\
\mathbf{elif}\;z \le 1.171929517275323183425491158459386867597 \cdot 10^{97}:\\
\;\;\;\;\left(\left(x \cdot y\right) \cdot \frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}\right) \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r281435 = x;
double r281436 = y;
double r281437 = r281435 * r281436;
double r281438 = z;
double r281439 = r281437 * r281438;
double r281440 = r281438 * r281438;
double r281441 = t;
double r281442 = a;
double r281443 = r281441 * r281442;
double r281444 = r281440 - r281443;
double r281445 = sqrt(r281444);
double r281446 = r281439 / r281445;
return r281446;
}
double f(double x, double y, double z, double t, double a) {
double r281447 = z;
double r281448 = -1.3401354470987563e+154;
bool r281449 = r281447 <= r281448;
double r281450 = x;
double r281451 = y;
double r281452 = r281450 * r281451;
double r281453 = -r281452;
double r281454 = 1.1719295172753232e+97;
bool r281455 = r281447 <= r281454;
double r281456 = cbrt(r281447);
double r281457 = r281456 * r281456;
double r281458 = r281447 * r281447;
double r281459 = t;
double r281460 = a;
double r281461 = r281459 * r281460;
double r281462 = r281458 - r281461;
double r281463 = sqrt(r281462);
double r281464 = cbrt(r281463);
double r281465 = r281464 * r281464;
double r281466 = r281457 / r281465;
double r281467 = r281452 * r281466;
double r281468 = r281456 / r281464;
double r281469 = r281467 * r281468;
double r281470 = r281455 ? r281469 : r281452;
double r281471 = r281449 ? r281453 : r281470;
return r281471;
}




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 | 8.0 |
| Herbie | 6.3 |
if z < -1.3401354470987563e+154Initial program 53.4
rmApplied *-un-lft-identity53.4
Applied sqrt-prod53.4
Applied times-frac53.0
Simplified53.0
Taylor expanded around -inf 1.4
if -1.3401354470987563e+154 < z < 1.1719295172753232e+97Initial program 11.3
rmApplied *-un-lft-identity11.3
Applied sqrt-prod11.3
Applied times-frac9.1
Simplified9.1
rmApplied add-cube-cbrt9.8
Applied add-cube-cbrt9.4
Applied times-frac9.4
Applied associate-*r*8.7
if 1.1719295172753232e+97 < z Initial program 43.1
rmApplied *-un-lft-identity43.1
Applied sqrt-prod43.1
Applied times-frac40.1
Simplified40.1
rmApplied associate-*l*40.1
Taylor expanded around inf 2.6
Final simplification6.3
herbie shell --seed 2019323
(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)))))