- Split input into 2 regimes
if (- (log (+ N 1)) (log N)) < 4.0142178601380495e-08
Initial program 60.0
\[\log \left(N + 1\right) - \log N\]
Taylor expanded around inf 60.0
\[\leadsto \color{blue}{\left(\frac{1}{N} - \left(\log \left(\frac{1}{N}\right) + \frac{1}{2} \cdot \frac{1}{{N}^{2}}\right)\right)} - \log N\]
Applied simplify0.0
\[\leadsto \color{blue}{\left(0 + \frac{1}{N}\right) - \frac{\frac{\frac{1}{2}}{N}}{N}}\]
if 4.0142178601380495e-08 < (- (log (+ N 1)) (log N))
Initial program 0.4
\[\log \left(N + 1\right) - \log N\]
- Using strategy
rm Applied flip3-+0.4
\[\leadsto \log \color{blue}{\left(\frac{{N}^{3} + {1}^{3}}{N \cdot N + \left(1 \cdot 1 - N \cdot 1\right)}\right)} - \log N\]
Applied log-div0.4
\[\leadsto \color{blue}{\left(\log \left({N}^{3} + {1}^{3}\right) - \log \left(N \cdot N + \left(1 \cdot 1 - N \cdot 1\right)\right)\right)} - \log N\]
Applied simplify0.4
\[\leadsto \left(\color{blue}{\log \left(1 + {N}^{3}\right)} - \log \left(N \cdot N + \left(1 \cdot 1 - N \cdot 1\right)\right)\right) - \log N\]
Applied simplify0.4
\[\leadsto \left(\log \left(1 + {N}^{3}\right) - \color{blue}{\log \left(N \cdot N + \left(1 - N\right)\right)}\right) - \log N\]
- Recombined 2 regimes into one program.
Applied simplify0.2
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;\log \left(1 + N\right) - \log N \le 4.0142178601380495 \cdot 10^{-08}:\\
\;\;\;\;\frac{1}{N} - \frac{\frac{\frac{1}{2}}{N}}{N}\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(1 + {N}^{3}\right) - \log \left(\left(1 - N\right) + N \cdot N\right)\right) - \log N\\
\end{array}}\]