\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\begin{array}{l}
\mathbf{if}\;k \leq 6.06190966441004 \cdot 10^{+44}:\\
\;\;\;\;\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(e^{m}\right)}^{\log k}}{k} \cdot \frac{a}{k}\\
\end{array}(FPCore (a k m) :precision binary64 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
(FPCore (a k m) :precision binary64 (if (<= k 6.06190966441004e+44) (/ (* a (pow k m)) (+ 1.0 (* k (+ k 10.0)))) (* (/ (pow (exp m) (log k)) k) (/ a k))))
double code(double a, double k, double m) {
return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
double code(double a, double k, double m) {
double tmp;
if (k <= 6.06190966441004e+44) {
tmp = (a * pow(k, m)) / (1.0 + (k * (k + 10.0)));
} else {
tmp = (pow(exp(m), log(k)) / k) * (a / k);
}
return tmp;
}



Bits error versus a



Bits error versus k



Bits error versus m
Results
if k < 6.0619096644100396e44Initial program 0.1
Simplified0.0
if 6.0619096644100396e44 < k Initial program 6.1
Simplified6.1
rmApplied add-sqr-sqrt_binary64_14646.1
Applied times-frac_binary64_14486.1
Taylor expanded around -inf 64.0
Simplified0.2
Final simplification0.1
herbie shell --seed 2021027
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))