\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
t_1 := \left(1 + k \cdot 10\right) + k \cdot k\\
\mathbf{if}\;\frac{t_0}{t_1} \leq 8.396832676077389 \cdot 10^{+155}:\\
\;\;\;\;\frac{{k}^{m} \cdot \frac{a}{\sqrt{\mathsf{fma}\left(k, k + 10, 1\right)}}}{\sqrt{t_1}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\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))) (t_1 (+ (+ 1.0 (* k 10.0)) (* k k))))
(if (<= (/ t_0 t_1) 8.396832676077389e+155)
(/ (* (pow k m) (/ a (sqrt (fma k (+ k 10.0) 1.0)))) (sqrt t_1))
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 t_1 = (1.0 + (k * 10.0)) + (k * k);
double tmp;
if ((t_0 / t_1) <= 8.396832676077389e+155) {
tmp = (pow(k, m) * (a / sqrt(fma(k, (k + 10.0), 1.0)))) / sqrt(t_1);
} else {
tmp = t_0;
}
return tmp;
}



Bits error versus a



Bits error versus k



Bits error versus m
if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 1 (*.f64 10 k)) (*.f64 k k))) < 8.39683267607738909e155Initial program 1.8
Applied add-sqr-sqrt_binary641.9
Applied associate-/r*_binary641.9
Simplified2.3
if 8.39683267607738909e155 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 1 (*.f64 10 k)) (*.f64 k k))) Initial program 19.9
Simplified19.8
Taylor expanded in k around 0 18.4
Simplified1.4
Final simplification2.1
herbie shell --seed 2022067
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))