\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;k \leq 1.2910446494967518 \cdot 10^{+141}:\\
\;\;\;\;\frac{t_0}{\left(1 + k \cdot 10\right) + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(99, \frac{a}{{k}^{4}}, \mathsf{fma}\left(\frac{a}{k}, \frac{{k}^{m}}{k}, \mathsf{fma}\left(\frac{t_0}{{k}^{3}}, -10, \frac{-980}{\frac{{k}^{5}}{t_0}}\right)\right)\right)\\
\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
(let* ((t_0 (* a (pow k m))))
(if (<= k 1.2910446494967518e+141)
(/ t_0 (+ (+ 1.0 (* k 10.0)) (* k k)))
(fma
99.0
(/ a (pow k 4.0))
(fma
(/ a k)
(/ (pow k m) k)
(fma (/ t_0 (pow k 3.0)) -10.0 (/ -980.0 (/ (pow k 5.0) t_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 t_0 = a * pow(k, m);
double tmp;
if (k <= 1.2910446494967518e+141) {
tmp = t_0 / ((1.0 + (k * 10.0)) + (k * k));
} else {
tmp = fma(99.0, (a / pow(k, 4.0)), fma((a / k), (pow(k, m) / k), fma((t_0 / pow(k, 3.0)), -10.0, (-980.0 / (pow(k, 5.0) / t_0)))));
}
return tmp;
}



Bits error versus a



Bits error versus k



Bits error versus m
if k < 1.29104464949675179e141Initial program 0.1
if 1.29104464949675179e141 < k Initial program 10.5
Simplified10.5
Applied add-sqr-sqrt_binary6410.5
Applied associate-/r*_binary6410.5
Taylor expanded in k around inf 10.5
Simplified0.1
Taylor expanded in m around 0 0.1
Final simplification0.1
herbie shell --seed 2021280
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))