\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}:\\
\;\;\;\;-x \cdot y\\
\mathbf{elif}\;z \le 6.9260668882011419 \cdot 10^{147}:\\
\;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r403102 = x;
double r403103 = y;
double r403104 = r403102 * r403103;
double r403105 = z;
double r403106 = r403104 * r403105;
double r403107 = r403105 * r403105;
double r403108 = t;
double r403109 = a;
double r403110 = r403108 * r403109;
double r403111 = r403107 - r403110;
double r403112 = sqrt(r403111);
double r403113 = r403106 / r403112;
return r403113;
}
double f(double x, double y, double z, double t, double a) {
double r403114 = z;
double r403115 = -8.618354790122042e+153;
bool r403116 = r403114 <= r403115;
double r403117 = x;
double r403118 = y;
double r403119 = r403117 * r403118;
double r403120 = -r403119;
double r403121 = 6.926066888201142e+147;
bool r403122 = r403114 <= r403121;
double r403123 = r403114 * r403114;
double r403124 = t;
double r403125 = a;
double r403126 = r403124 * r403125;
double r403127 = r403123 - r403126;
double r403128 = sqrt(r403127);
double r403129 = r403128 / r403114;
double r403130 = r403118 / r403129;
double r403131 = r403117 * r403130;
double r403132 = r403122 ? r403131 : r403119;
double r403133 = r403116 ? r403120 : r403132;
return r403133;
}




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
Final simplification6.2
herbie shell --seed 2020045
(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)))))