\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -2.465998159965367372739527425522646175119 \cdot 10^{149}:\\
\;\;\;\;-x \cdot y\\
\mathbf{elif}\;z \le 4.020794709845025708842624738781094962913 \cdot 10^{94}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r243588 = x;
double r243589 = y;
double r243590 = r243588 * r243589;
double r243591 = z;
double r243592 = r243590 * r243591;
double r243593 = r243591 * r243591;
double r243594 = t;
double r243595 = a;
double r243596 = r243594 * r243595;
double r243597 = r243593 - r243596;
double r243598 = sqrt(r243597);
double r243599 = r243592 / r243598;
return r243599;
}
double f(double x, double y, double z, double t, double a) {
double r243600 = z;
double r243601 = -2.4659981599653674e+149;
bool r243602 = r243600 <= r243601;
double r243603 = x;
double r243604 = y;
double r243605 = r243603 * r243604;
double r243606 = -r243605;
double r243607 = 4.020794709845026e+94;
bool r243608 = r243600 <= r243607;
double r243609 = r243600 * r243600;
double r243610 = t;
double r243611 = a;
double r243612 = r243610 * r243611;
double r243613 = r243609 - r243612;
double r243614 = sqrt(r243613);
double r243615 = r243600 / r243614;
double r243616 = r243604 * r243615;
double r243617 = r243603 * r243616;
double r243618 = r243604 * r243603;
double r243619 = r243608 ? r243617 : r243618;
double r243620 = r243602 ? r243606 : r243619;
return r243620;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.6 |
|---|---|
| Target | 7.5 |
| Herbie | 6.0 |
if z < -2.4659981599653674e+149Initial program 52.9
Taylor expanded around -inf 1.4
Simplified1.4
if -2.4659981599653674e+149 < z < 4.020794709845026e+94Initial program 10.7
rmApplied *-un-lft-identity10.7
Applied sqrt-prod10.7
Applied times-frac8.6
Simplified8.6
rmApplied associate-*l*8.5
if 4.020794709845026e+94 < z Initial program 42.9
rmApplied *-un-lft-identity42.9
Applied sqrt-prod42.9
Applied times-frac40.7
Simplified40.7
Taylor expanded around inf 2.4
Final simplification6.0
herbie shell --seed 2019208
(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.1921305903852764e46) (- (* y x)) (if (< z 5.9762681209208942e90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))