Average Error: 2.0 → 0.2
Time: 1.5m
Precision: 64
Internal Precision: 320
\[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\]
\[\begin{array}{l} \mathbf{if}\;k \le 3.9501795571041663 \cdot 10^{+151}:\\ \;\;\;\;\frac{\frac{{k}^{m} \cdot a}{\sqrt{(k \cdot \left(10 + k\right) + 1)_*}}}{\sqrt{\left(1 + 10 \cdot k\right) + k \cdot k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{(\left(\frac{k}{a}\right) \cdot \left({k}^{\left(-m\right)} \cdot \left(k + 10\right)\right) + \left(\frac{{k}^{\left(-m\right)}}{a}\right))_*}\\ \end{array}\]

Error

Bits error versus a

Bits error versus k

Bits error versus m

Derivation

  1. Split input into 2 regimes
  2. if k < 3.9501795571041663e+151

    1. Initial program 0.1

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt0.1

      \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{\sqrt{\left(1 + 10 \cdot k\right) + k \cdot k} \cdot \sqrt{\left(1 + 10 \cdot k\right) + k \cdot k}}}\]
    4. Applied associate-/r*0.1

      \[\leadsto \color{blue}{\frac{\frac{a \cdot {k}^{m}}{\sqrt{\left(1 + 10 \cdot k\right) + k \cdot k}}}{\sqrt{\left(1 + 10 \cdot k\right) + k \cdot k}}}\]
    5. Applied simplify0.1

      \[\leadsto \frac{\color{blue}{\frac{{k}^{m} \cdot a}{\sqrt{(k \cdot \left(10 + k\right) + 1)_*}}}}{\sqrt{\left(1 + 10 \cdot k\right) + k \cdot k}}\]

    if 3.9501795571041663e+151 < k

    1. Initial program 9.5

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\]
    2. Using strategy rm
    3. Applied clear-num9.5

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(1 + 10 \cdot k\right) + k \cdot k}{a \cdot {k}^{m}}}}\]
    4. Applied simplify9.5

      \[\leadsto \frac{1}{\color{blue}{\frac{(\left(10 + k\right) \cdot k + 1)_*}{{k}^{m} \cdot a}}}\]
    5. Taylor expanded around inf 9.5

      \[\leadsto \frac{1}{\color{blue}{10 \cdot \frac{k}{a \cdot e^{-1 \cdot \left(\log \left(\frac{1}{k}\right) \cdot m\right)}} + \left(\frac{1}{e^{-1 \cdot \left(\log \left(\frac{1}{k}\right) \cdot m\right)} \cdot a} + \frac{{k}^{2}}{a \cdot e^{-1 \cdot \left(\log \left(\frac{1}{k}\right) \cdot m\right)}}\right)}}\]
    6. Applied simplify0.7

      \[\leadsto \color{blue}{\frac{1}{(\left(\frac{k}{a}\right) \cdot \left({k}^{\left(-m\right)} \cdot \left(k + 10\right)\right) + \left(\frac{{k}^{\left(-m\right)}}{a}\right))_*}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 1.5m)Debug logProfile

herbie shell --seed 2018178 +o rules:numerics
(FPCore (a k m)
  :name "Falkner and Boettcher, Appendix A"
  (/ (* a (pow k m)) (+ (+ 1 (* 10 k)) (* k k))))