\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\begin{array}{l}
\mathbf{if}\;k \le 3884199.03848918015:\\
\;\;\;\;\frac{\left(a \cdot {\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}^{m}\right) \cdot {\left(\sqrt[3]{k}\right)}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}}{k}, \frac{a}{k}, 99 \cdot \frac{a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}}{{k}^{4}} - 10 \cdot \frac{a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}}{{k}^{3}}\right)\\
\end{array}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 VAR;
if ((k <= 3884199.03848918)) {
VAR = (((a * pow((cbrt(k) * cbrt(k)), m)) * pow(cbrt(k), m)) / ((1.0 + (10.0 * k)) + (k * k)));
} else {
VAR = fma((exp((-1.0 * (m * log((1.0 / k))))) / k), (a / k), ((99.0 * ((a * exp((-1.0 * (m * log((1.0 / k)))))) / pow(k, 4.0))) - (10.0 * ((a * exp((-1.0 * (m * log((1.0 / k)))))) / pow(k, 3.0)))));
}
return VAR;
}



Bits error versus a



Bits error versus k



Bits error versus m
Results
if k < 3884199.03848918Initial program 0.1
rmApplied add-cube-cbrt0.1
Applied unpow-prod-down0.1
Applied associate-*r*0.1
if 3884199.03848918 < k Initial program 5.8
Taylor expanded around inf 5.8
Simplified0.1
Final simplification0.1
herbie shell --seed 2020105 +o rules:numerics
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1 (* 10 k)) (* k k))))