\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.1125528044552557 \cdot 10^{144}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \le 1.09631820124514439 \cdot 10^{69}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{\frac{z}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 1\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r422607 = x;
double r422608 = y;
double r422609 = r422607 * r422608;
double r422610 = z;
double r422611 = r422609 * r422610;
double r422612 = r422610 * r422610;
double r422613 = t;
double r422614 = a;
double r422615 = r422613 * r422614;
double r422616 = r422612 - r422615;
double r422617 = sqrt(r422616);
double r422618 = r422611 / r422617;
return r422618;
}
double f(double x, double y, double z, double t, double a) {
double r422619 = z;
double r422620 = -1.1125528044552557e+144;
bool r422621 = r422619 <= r422620;
double r422622 = -1.0;
double r422623 = x;
double r422624 = y;
double r422625 = r422623 * r422624;
double r422626 = r422622 * r422625;
double r422627 = 1.0963182012451444e+69;
bool r422628 = r422619 <= r422627;
double r422629 = r422619 * r422619;
double r422630 = t;
double r422631 = a;
double r422632 = r422630 * r422631;
double r422633 = r422629 - r422632;
double r422634 = sqrt(r422633);
double r422635 = sqrt(r422634);
double r422636 = r422619 / r422635;
double r422637 = r422636 / r422635;
double r422638 = r422625 * r422637;
double r422639 = 1.0;
double r422640 = r422625 * r422639;
double r422641 = r422628 ? r422638 : r422640;
double r422642 = r422621 ? r422626 : r422641;
return r422642;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.2 |
|---|---|
| Target | 7.8 |
| Herbie | 6.5 |
if z < -1.1125528044552557e+144Initial program 51.4
rmApplied *-un-lft-identity51.4
Applied sqrt-prod51.4
Applied times-frac50.5
Simplified50.5
rmApplied add-sqr-sqrt50.5
Applied sqrt-prod50.5
Applied associate-/r*50.5
Taylor expanded around -inf 1.4
if -1.1125528044552557e+144 < z < 1.0963182012451444e+69Initial program 10.9
rmApplied *-un-lft-identity10.9
Applied sqrt-prod10.9
Applied times-frac8.9
Simplified8.9
rmApplied add-sqr-sqrt8.9
Applied sqrt-prod9.2
Applied associate-/r*9.2
if 1.0963182012451444e+69 < z Initial program 39.2
rmApplied *-un-lft-identity39.2
Applied sqrt-prod39.2
Applied times-frac36.7
Simplified36.7
Taylor expanded around inf 2.9
Final simplification6.5
herbie shell --seed 2020035
(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)))))