\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\begin{array}{l}
\mathbf{if}\;z \le -1.068598920199789518598282705570987537021 \cdot 10^{144}:\\
\;\;\;\;x \cdot \left(-1 \cdot y\right)\\
\mathbf{elif}\;z \le 1.584842902493884824536728315524484983777 \cdot 10^{121}:\\
\;\;\;\;\frac{x \cdot 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 r359161 = x;
double r359162 = y;
double r359163 = r359161 * r359162;
double r359164 = z;
double r359165 = r359163 * r359164;
double r359166 = r359164 * r359164;
double r359167 = t;
double r359168 = a;
double r359169 = r359167 * r359168;
double r359170 = r359166 - r359169;
double r359171 = sqrt(r359170);
double r359172 = r359165 / r359171;
return r359172;
}
double f(double x, double y, double z, double t, double a) {
double r359173 = z;
double r359174 = -1.0685989201997895e+144;
bool r359175 = r359173 <= r359174;
double r359176 = x;
double r359177 = -1.0;
double r359178 = y;
double r359179 = r359177 * r359178;
double r359180 = r359176 * r359179;
double r359181 = 1.5848429024938848e+121;
bool r359182 = r359173 <= r359181;
double r359183 = r359176 * r359178;
double r359184 = r359173 * r359173;
double r359185 = t;
double r359186 = a;
double r359187 = r359185 * r359186;
double r359188 = r359184 - r359187;
double r359189 = sqrt(r359188);
double r359190 = r359189 / r359173;
double r359191 = r359183 / r359190;
double r359192 = r359182 ? r359191 : r359183;
double r359193 = r359175 ? r359180 : r359192;
return r359193;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.8 |
|---|---|
| Target | 7.6 |
| Herbie | 6.4 |
if z < -1.0685989201997895e+144Initial program 51.3
rmApplied associate-/l*50.6
rmApplied *-un-lft-identity50.6
Applied *-un-lft-identity50.6
Applied sqrt-prod50.6
Applied times-frac50.6
Applied times-frac50.6
Simplified50.6
Taylor expanded around -inf 1.2
if -1.0685989201997895e+144 < z < 1.5848429024938848e+121Initial program 11.2
rmApplied associate-/l*9.1
if 1.5848429024938848e+121 < z Initial program 48.0
Taylor expanded around inf 1.5
Final simplification6.4
herbie shell --seed 2019362 +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)))))