- Split input into 2 regimes
if (/ (+ a (* (log k) (* m a))) (+ 1 (* k (+ k 10)))) < -1.7734617757330396e-276 or 5.51750367027517e-310 < (/ (+ a (* (log k) (* m a))) (+ 1 (* k (+ k 10))))
Initial program 0.1
\[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\]
Initial simplification0.0
\[\leadsto \frac{{k}^{m} \cdot a}{1 + k \cdot \left(k + 10\right)}\]
- Using strategy
rm Applied add-sqr-sqrt0.2
\[\leadsto \frac{{k}^{m} \cdot a}{\color{blue}{\sqrt{1 + k \cdot \left(k + 10\right)} \cdot \sqrt{1 + k \cdot \left(k + 10\right)}}}\]
Applied associate-/r*0.2
\[\leadsto \color{blue}{\frac{\frac{{k}^{m} \cdot a}{\sqrt{1 + k \cdot \left(k + 10\right)}}}{\sqrt{1 + k \cdot \left(k + 10\right)}}}\]
if -1.7734617757330396e-276 < (/ (+ a (* (log k) (* m a))) (+ 1 (* k (+ k 10)))) < 5.51750367027517e-310
Initial program 9.4
\[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\]
Initial simplification9.4
\[\leadsto \frac{{k}^{m} \cdot a}{1 + k \cdot \left(k + 10\right)}\]
Taylor expanded around inf 11.2
\[\leadsto \color{blue}{\left(99 \cdot \frac{e^{-1 \cdot \left(\log \left(\frac{1}{k}\right) \cdot m\right)} \cdot a}{{k}^{4}} + \frac{e^{-1 \cdot \left(\log \left(\frac{1}{k}\right) \cdot m\right)} \cdot a}{{k}^{2}}\right) - 10 \cdot \frac{e^{-1 \cdot \left(\log \left(\frac{1}{k}\right) \cdot m\right)} \cdot a}{{k}^{3}}}\]
Simplified2.1
\[\leadsto \color{blue}{\frac{{k}^{m}}{k} \cdot \left(\frac{a}{k} - \frac{10}{k} \cdot \frac{a}{k}\right) + \frac{{k}^{m}}{{k}^{4}} \cdot \left(99 \cdot a\right)}\]
- Recombined 2 regimes into one program.
Final simplification0.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;\frac{\left(m \cdot a\right) \cdot \log k + a}{1 + k \cdot \left(k + 10\right)} \le -1.7734617757330396 \cdot 10^{-276}:\\
\;\;\;\;\frac{\frac{{k}^{m} \cdot a}{\sqrt{1 + k \cdot \left(k + 10\right)}}}{\sqrt{1 + k \cdot \left(k + 10\right)}}\\
\mathbf{elif}\;\frac{\left(m \cdot a\right) \cdot \log k + a}{1 + k \cdot \left(k + 10\right)} \le 5.51750367027517 \cdot 10^{-310}:\\
\;\;\;\;\left(99 \cdot a\right) \cdot \frac{{k}^{m}}{{k}^{4}} + \left(\frac{a}{k} - \frac{10}{k} \cdot \frac{a}{k}\right) \cdot \frac{{k}^{m}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{k}^{m} \cdot a}{\sqrt{1 + k \cdot \left(k + 10\right)}}}{\sqrt{1 + k \cdot \left(k + 10\right)}}\\
\end{array}\]