\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.8913959868564195 \cdot 10^{+154}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z \le 1.1848486164183457 \cdot 10^{+114}:\\
\;\;\;\;\left(y \cdot x\right) \cdot \left(z \cdot \frac{1}{\sqrt{z \cdot z - a \cdot t}}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r16941453 = x;
double r16941454 = y;
double r16941455 = r16941453 * r16941454;
double r16941456 = z;
double r16941457 = r16941455 * r16941456;
double r16941458 = r16941456 * r16941456;
double r16941459 = t;
double r16941460 = a;
double r16941461 = r16941459 * r16941460;
double r16941462 = r16941458 - r16941461;
double r16941463 = sqrt(r16941462);
double r16941464 = r16941457 / r16941463;
return r16941464;
}
double f(double x, double y, double z, double t, double a) {
double r16941465 = z;
double r16941466 = -1.8913959868564195e+154;
bool r16941467 = r16941465 <= r16941466;
double r16941468 = y;
double r16941469 = x;
double r16941470 = r16941468 * r16941469;
double r16941471 = -r16941470;
double r16941472 = 1.1848486164183457e+114;
bool r16941473 = r16941465 <= r16941472;
double r16941474 = 1.0;
double r16941475 = r16941465 * r16941465;
double r16941476 = a;
double r16941477 = t;
double r16941478 = r16941476 * r16941477;
double r16941479 = r16941475 - r16941478;
double r16941480 = sqrt(r16941479);
double r16941481 = r16941474 / r16941480;
double r16941482 = r16941465 * r16941481;
double r16941483 = r16941470 * r16941482;
double r16941484 = r16941473 ? r16941483 : r16941470;
double r16941485 = r16941467 ? r16941471 : r16941484;
return r16941485;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 23.8 |
|---|---|
| Target | 7.6 |
| Herbie | 5.9 |
if z < -1.8913959868564195e+154Initial program 53.3
rmApplied *-un-lft-identity53.3
Applied sqrt-prod53.3
Applied times-frac53.4
Simplified53.4
Taylor expanded around -inf 1.3
Simplified1.3
if -1.8913959868564195e+154 < z < 1.1848486164183457e+114Initial program 10.2
rmApplied *-un-lft-identity10.2
Applied sqrt-prod10.2
Applied times-frac8.2
Simplified8.2
rmApplied div-inv8.2
if 1.1848486164183457e+114 < z Initial program 45.5
rmApplied *-un-lft-identity45.5
Applied sqrt-prod45.5
Applied times-frac44.0
Simplified44.0
rmApplied div-inv44.0
rmApplied associate-*l*44.0
Simplified44.0
Taylor expanded around inf 1.6
Final simplification5.9
herbie shell --seed 2019163
(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)))))