\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\begin{array}{l}
\mathbf{if}\;k \leq 2.2014896057993437 \cdot 10^{+23}:\\
\;\;\;\;\frac{a}{\frac{\mathsf{fma}\left(k, k + 10, 1\right)}{{k}^{m}}}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_0 := e^{m \cdot \log k}\\
\mathsf{fma}\left(\frac{a}{k}, \frac{t_0}{k}, \frac{a \cdot t_0}{{k}^{3}} \cdot -10\right)
\end{array}\\
\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 2.2014896057993437e+23)
(/ a (/ (fma k (+ k 10.0) 1.0) (pow k m)))
(let* ((t_0 (exp (* m (log k)))))
(fma (/ a k) (/ t_0 k) (* (/ (* a t_0) (pow k 3.0)) -10.0)))))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 <= 2.2014896057993437e+23) {
tmp = a / (fma(k, (k + 10.0), 1.0) / pow(k, m));
} else {
double t_0 = exp(m * log(k));
tmp = fma((a / k), (t_0 / k), (((a * t_0) / pow(k, 3.0)) * -10.0));
}
return tmp;
}



Bits error versus a



Bits error versus k



Bits error versus m
if k < 2.20148960579934373e23Initial program 0.0
Simplified0.0
Applied add-sqr-sqrt_binary640.1
Applied associate-/r*_binary640.1
Applied *-un-lft-identity_binary640.1
Applied sqrt-prod_binary640.1
Applied times-frac_binary640.1
Applied associate-/l*_binary640.1
Simplified0.0
if 2.20148960579934373e23 < k Initial program 5.5
Simplified5.5
Applied add-sqr-sqrt_binary645.5
Applied associate-/r*_binary645.5
Applied *-un-lft-identity_binary645.5
Applied add-sqr-sqrt_binary645.5
Applied times-frac_binary645.6
Applied times-frac_binary645.6
Taylor expanded in k around inf 5.5
Simplified0.1
Final simplification0.1
herbie shell --seed 2021215
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))