\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\begin{array}{l}
\mathbf{if}\;k \le 1.8029813469456922 \cdot 10^{38}:\\
\;\;\;\;\left(\left(a \cdot {\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}^{m}\right) \cdot {\left(\sqrt[3]{k}\right)}^{m}\right) \cdot \frac{2}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(k, 10, 1\right)\right) \cdot 2}\\
\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 temp;
if ((k <= 1.8029813469456922e+38)) {
temp = (((a * pow((cbrt(k) * cbrt(k)), m)) * pow(cbrt(k), m)) * (2.0 / (fma(k, k, fma(k, 10.0, 1.0)) * 2.0)));
} else {
temp = 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 temp;
}



Bits error versus a



Bits error versus k



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