- Split input into 3 regimes
if re < -5.967196202722995e+66
Initial program 45.4
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Initial simplification45.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied times-frac45.3
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified45.3
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
Taylor expanded around -inf 10.3
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)}}{\log base} \cdot 1\]
Simplified10.3
\[\leadsto \frac{\log \color{blue}{\left(-re\right)}}{\log base} \cdot 1\]
if -5.967196202722995e+66 < re < 3.254986202187133e+123
Initial program 21.8
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Initial simplification21.8
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied times-frac21.7
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified21.7
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
if 3.254986202187133e+123 < re
Initial program 52.5
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Initial simplification52.5
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied times-frac52.5
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified52.5
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
Taylor expanded around inf 7.5
\[\leadsto \frac{\log \color{blue}{re}}{\log base} \cdot 1\]
- Recombined 3 regimes into one program.
Final simplification17.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -5.967196202722995 \cdot 10^{+66}:\\
\;\;\;\;\frac{\log \left(-re\right)}{\log base}\\
\mathbf{elif}\;re \le 3.254986202187133 \cdot 10^{+123}:\\
\;\;\;\;\frac{\log \left(\sqrt{im \cdot im + re \cdot re}\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log re}{\log base}\\
\end{array}\]