\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\begin{array}{l}
\mathbf{if}\;k \le 5.51767791817717477 \cdot 10^{56}:\\
\;\;\;\;\frac{a \cdot {k}^{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 temp;
if ((k <= 5.517677918177175e+56)) {
temp = ((a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k)));
} 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 < 5.517677918177175e+56Initial program 0.1
rmApplied add-sqr-sqrt0.1
Applied associate-*r*0.1
rmApplied *-un-lft-identity0.1
Applied associate-/r*0.1
Simplified0.1
if 5.517677918177175e+56 < k Initial program 7.2
Taylor expanded around inf 7.2
Simplified0.2
Final simplification0.1
herbie shell --seed 2020065 +o rules:numerics
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1 (* 10 k)) (* k k))))