\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\begin{array}{l}
\mathbf{if}\;k \leq 5.99520752198366 \cdot 10^{+89}:\\
\;\;\;\;\frac{a}{\frac{\sqrt{1 + \left(k \cdot 10 + k \cdot k\right)}}{\frac{{k}^{m}}{\sqrt{1 + \left(k \cdot 10 + k \cdot k\right)}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{k} \cdot \frac{e^{m \cdot \log k}}{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 5.99520752198366e+89)
(/
a
(/
(sqrt (+ 1.0 (+ (* k 10.0) (* k k))))
(/ (pow k m) (sqrt (+ 1.0 (+ (* k 10.0) (* k k)))))))
(* (/ a k) (/ (exp (* m (log k))) 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 <= 5.99520752198366e+89) {
tmp = a / (sqrt(1.0 + ((k * 10.0) + (k * k))) / (pow(k, m) / sqrt(1.0 + ((k * 10.0) + (k * k)))));
} else {
tmp = (a / k) * (exp(m * log(k)) / k);
}
return tmp;
}



Bits error versus a



Bits error versus k



Bits error versus m
Results
if k < 5.99520752198365953e89Initial program 0.1
Simplified0.1
rmApplied add-sqr-sqrt_binary64_18050.2
Applied associate-/l*_binary64_17280.2
if 5.99520752198365953e89 < k Initial program 7.3
Simplified7.3
Taylor expanded around inf 7.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2021176
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))