\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -5.841072424480832961575433736923648161714 \cdot 10^{103}:\\
\;\;\;\;\left(x \cdot y\right) \cdot -1\\
\mathbf{elif}\;z \le 6.447720564522468628519061845818630465482 \cdot 10^{-228}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{elif}\;z \le 5.408002280660189019237963487412179983855 \cdot 10^{-170}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \le 6.344623429916867054620353842811536561075 \cdot 10^{113}:\\
\;\;\;\;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 r311622 = x;
double r311623 = y;
double r311624 = r311622 * r311623;
double r311625 = z;
double r311626 = r311624 * r311625;
double r311627 = r311625 * r311625;
double r311628 = t;
double r311629 = a;
double r311630 = r311628 * r311629;
double r311631 = r311627 - r311630;
double r311632 = sqrt(r311631);
double r311633 = r311626 / r311632;
return r311633;
}
double f(double x, double y, double z, double t, double a) {
double r311634 = z;
double r311635 = -5.841072424480833e+103;
bool r311636 = r311634 <= r311635;
double r311637 = x;
double r311638 = y;
double r311639 = r311637 * r311638;
double r311640 = -1.0;
double r311641 = r311639 * r311640;
double r311642 = 6.447720564522469e-228;
bool r311643 = r311634 <= r311642;
double r311644 = r311634 * r311634;
double r311645 = t;
double r311646 = a;
double r311647 = r311645 * r311646;
double r311648 = r311644 - r311647;
double r311649 = sqrt(r311648);
double r311650 = r311634 / r311649;
double r311651 = r311638 * r311650;
double r311652 = r311637 * r311651;
double r311653 = 5.408002280660189e-170;
bool r311654 = r311634 <= r311653;
double r311655 = 6.344623429916867e+113;
bool r311656 = r311634 <= r311655;
double r311657 = r311656 ? r311652 : r311639;
double r311658 = r311654 ? r311639 : r311657;
double r311659 = r311643 ? r311652 : r311658;
double r311660 = r311636 ? r311641 : r311659;
return r311660;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.1 |
|---|---|
| Target | 7.4 |
| Herbie | 7.1 |
if z < -5.841072424480833e+103Initial program 44.4
rmApplied *-un-lft-identity44.4
Applied sqrt-prod44.4
Applied times-frac41.9
Simplified41.9
Taylor expanded around -inf 2.0
if -5.841072424480833e+103 < z < 6.447720564522469e-228 or 5.408002280660189e-170 < z < 6.344623429916867e+113Initial program 10.0
rmApplied *-un-lft-identity10.0
Applied sqrt-prod10.0
Applied times-frac8.3
Simplified8.3
rmApplied associate-*l*8.3
if 6.447720564522469e-228 < z < 5.408002280660189e-170 or 6.344623429916867e+113 < z Initial program 40.5
rmApplied *-un-lft-identity40.5
Applied sqrt-prod40.5
Applied times-frac38.8
Simplified38.8
rmApplied associate-*l*38.6
Taylor expanded around inf 8.8
Final simplification7.1
herbie shell --seed 2019354
(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)))))