- Split input into 3 regimes
if n < -7.436426181453747e+45 or 1014549038.6750512 < n
Initial program 51.8
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
- Using strategy
rm Applied pow-to-exp56.4
\[\leadsto 100 \cdot \frac{\color{blue}{e^{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}}\]
Applied expm1-def56.4
\[\leadsto 100 \cdot \frac{\color{blue}{(e^{\log \left(1 + \frac{i}{n}\right) \cdot n} - 1)^*}}{\frac{i}{n}}\]
Simplified24.3
\[\leadsto 100 \cdot \frac{(e^{\color{blue}{n \cdot \log_* (1 + \frac{i}{n})}} - 1)^*}{\frac{i}{n}}\]
- Using strategy
rm Applied associate-/r/25.5
\[\leadsto 100 \cdot \color{blue}{\left(\frac{(e^{n \cdot \log_* (1 + \frac{i}{n})} - 1)^*}{i} \cdot n\right)}\]
Applied associate-*r*25.5
\[\leadsto \color{blue}{\left(100 \cdot \frac{(e^{n \cdot \log_* (1 + \frac{i}{n})} - 1)^*}{i}\right) \cdot n}\]
Taylor expanded around inf 44.6
\[\leadsto \left(100 \cdot \color{blue}{\frac{e^{i} - 1}{i}}\right) \cdot n\]
Simplified4.8
\[\leadsto \left(100 \cdot \color{blue}{\frac{(e^{i} - 1)^*}{i}}\right) \cdot n\]
if -7.436426181453747e+45 < n < 8.298202248326911e-251 or 2.4769975322682055e-175 < n < 1014549038.6750512
Initial program 41.8
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
- Using strategy
rm Applied pow-to-exp42.7
\[\leadsto 100 \cdot \frac{\color{blue}{e^{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}}\]
Applied expm1-def30.3
\[\leadsto 100 \cdot \frac{\color{blue}{(e^{\log \left(1 + \frac{i}{n}\right) \cdot n} - 1)^*}}{\frac{i}{n}}\]
Simplified5.4
\[\leadsto 100 \cdot \frac{(e^{\color{blue}{n \cdot \log_* (1 + \frac{i}{n})}} - 1)^*}{\frac{i}{n}}\]
if 8.298202248326911e-251 < n < 2.4769975322682055e-175
Initial program 45.9
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
- Using strategy
rm Applied pow-to-exp45.9
\[\leadsto 100 \cdot \frac{\color{blue}{e^{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}}\]
Applied expm1-def35.3
\[\leadsto 100 \cdot \frac{\color{blue}{(e^{\log \left(1 + \frac{i}{n}\right) \cdot n} - 1)^*}}{\frac{i}{n}}\]
Simplified20.1
\[\leadsto 100 \cdot \frac{(e^{\color{blue}{n \cdot \log_* (1 + \frac{i}{n})}} - 1)^*}{\frac{i}{n}}\]
Taylor expanded around 0 26.0
\[\leadsto \color{blue}{0}\]
- Recombined 3 regimes into one program.
Final simplification6.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;n \le -7.436426181453747 \cdot 10^{+45}:\\
\;\;\;\;\left(100 \cdot \frac{(e^{i} - 1)^*}{i}\right) \cdot n\\
\mathbf{elif}\;n \le 8.298202248326911 \cdot 10^{-251}:\\
\;\;\;\;\frac{(e^{\log_* (1 + \frac{i}{n}) \cdot n} - 1)^*}{\frac{i}{n}} \cdot 100\\
\mathbf{elif}\;n \le 2.4769975322682055 \cdot 10^{-175}:\\
\;\;\;\;0\\
\mathbf{elif}\;n \le 1014549038.6750512:\\
\;\;\;\;\frac{(e^{\log_* (1 + \frac{i}{n}) \cdot n} - 1)^*}{\frac{i}{n}} \cdot 100\\
\mathbf{else}:\\
\;\;\;\;\left(100 \cdot \frac{(e^{i} - 1)^*}{i}\right) \cdot n\\
\end{array}\]