- Split input into 3 regimes
if i < -4.2115984806157235e-05
Initial program 28.9
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
Initial simplification28.9
\[\leadsto \frac{(\left({\left(1 + \frac{i}{n}\right)}^{n}\right) \cdot 100 + -100)_*}{\frac{i}{n}}\]
- Using strategy
rm Applied add-exp-log28.9
\[\leadsto \frac{(\left({\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}}^{n}\right) \cdot 100 + -100)_*}{\frac{i}{n}}\]
Applied pow-exp28.9
\[\leadsto \frac{(\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right) \cdot n}\right)} \cdot 100 + -100)_*}{\frac{i}{n}}\]
Simplified6.0
\[\leadsto \frac{(\left(e^{\color{blue}{n \cdot \log_* (1 + \frac{i}{n})}}\right) \cdot 100 + -100)_*}{\frac{i}{n}}\]
if -4.2115984806157235e-05 < i < 0.15844506048134294
Initial program 57.8
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
Initial simplification57.8
\[\leadsto \frac{(\left({\left(1 + \frac{i}{n}\right)}^{n}\right) \cdot 100 + -100)_*}{\frac{i}{n}}\]
Taylor expanded around 0 25.9
\[\leadsto \frac{\color{blue}{100 \cdot i + \left(50 \cdot {i}^{2} + \frac{50}{3} \cdot {i}^{3}\right)}}{\frac{i}{n}}\]
Simplified25.9
\[\leadsto \frac{\color{blue}{i \cdot (i \cdot \left((i \cdot \frac{50}{3} + 50)_*\right) + 100)_*}}{\frac{i}{n}}\]
Taylor expanded around -inf 9.1
\[\leadsto \color{blue}{\frac{50}{3} \cdot \left({i}^{2} \cdot n\right) + \left(100 \cdot n + 50 \cdot \left(i \cdot n\right)\right)}\]
Simplified9.1
\[\leadsto \color{blue}{n \cdot (i \cdot \left((\frac{50}{3} \cdot i + 50)_*\right) + 100)_*}\]
if 0.15844506048134294 < i
Initial program 31.1
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
Initial simplification31.1
\[\leadsto \frac{(\left({\left(1 + \frac{i}{n}\right)}^{n}\right) \cdot 100 + -100)_*}{\frac{i}{n}}\]
Taylor expanded around 0 30.9
\[\leadsto \color{blue}{0}\]
- Recombined 3 regimes into one program.
Final simplification11.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;i \le -4.2115984806157235 \cdot 10^{-05}:\\
\;\;\;\;\frac{(\left(e^{n \cdot \log_* (1 + \frac{i}{n})}\right) \cdot 100 + -100)_*}{\frac{i}{n}}\\
\mathbf{elif}\;i \le 0.15844506048134294:\\
\;\;\;\;n \cdot (i \cdot \left((\frac{50}{3} \cdot i + 50)_*\right) + 100)_*\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}\]