\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -8.6183547901220424 \cdot 10^{153}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z \le 6.9260668882011419 \cdot 10^{147}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r294653 = x;
double r294654 = y;
double r294655 = r294653 * r294654;
double r294656 = z;
double r294657 = r294655 * r294656;
double r294658 = r294656 * r294656;
double r294659 = t;
double r294660 = a;
double r294661 = r294659 * r294660;
double r294662 = r294658 - r294661;
double r294663 = sqrt(r294662);
double r294664 = r294657 / r294663;
return r294664;
}
double f(double x, double y, double z, double t, double a) {
double r294665 = z;
double r294666 = -8.618354790122042e+153;
bool r294667 = r294665 <= r294666;
double r294668 = y;
double r294669 = x;
double r294670 = r294668 * r294669;
double r294671 = -r294670;
double r294672 = 6.926066888201142e+147;
bool r294673 = r294665 <= r294672;
double r294674 = r294665 * r294665;
double r294675 = t;
double r294676 = a;
double r294677 = r294675 * r294676;
double r294678 = r294674 - r294677;
double r294679 = sqrt(r294678);
double r294680 = r294679 / r294665;
double r294681 = r294668 / r294680;
double r294682 = r294669 * r294681;
double r294683 = r294673 ? r294682 : r294670;
double r294684 = r294667 ? r294671 : r294683;
return r294684;
}




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.7 |
| Herbie | 6.2 |
if z < -8.618354790122042e+153Initial program 54.0
Taylor expanded around -inf 1.1
Simplified1.1
if -8.618354790122042e+153 < z < 6.926066888201142e+147Initial program 11.2
rmApplied associate-/l*8.9
rmApplied *-un-lft-identity8.9
Applied *-un-lft-identity8.9
Applied sqrt-prod8.9
Applied times-frac8.9
Applied times-frac8.6
Simplified8.6
if 6.926066888201142e+147 < z Initial program 51.6
Taylor expanded around inf 1.2
Simplified1.2
Final simplification6.2
herbie shell --seed 2020045 +o rules:numerics
(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)))))