- Split input into 4 regimes
if im < -1.7153649862934488e+152
Initial program 61.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 simplification61.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 div-inv61.5
\[\leadsto \color{blue}{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) \cdot \frac{1}{\log base \cdot \log base}}\]
Taylor expanded around -inf 62.8
\[\leadsto \color{blue}{-1 \cdot \frac{\log \left(\frac{-1}{re}\right)}{\log -1 - \log \left(\frac{-1}{base}\right)}}\]
Simplified52.0
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
if -1.7153649862934488e+152 < im < -8.011125498683684e-143
Initial program 16.6
\[\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 simplification16.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied div-inv16.7
\[\leadsto \color{blue}{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) \cdot \frac{1}{\log base \cdot \log base}}\]
- Using strategy
rm Applied add-sqr-sqrt16.7
\[\leadsto \left(\log \color{blue}{\left(\sqrt{\sqrt{re \cdot re + im \cdot im}} \cdot \sqrt{\sqrt{re \cdot re + im \cdot im}}\right)} \cdot \log base\right) \cdot \frac{1}{\log base \cdot \log base}\]
if -8.011125498683684e-143 < im < 2.1516059334777307e-114
Initial program 28.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 simplification28.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-frac28.4
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified28.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
Taylor expanded around -inf 8.1
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)}}{\log base} \cdot 1\]
Simplified8.1
\[\leadsto \frac{\log \color{blue}{\left(-re\right)}}{\log base} \cdot 1\]
if 2.1516059334777307e-114 < im
Initial program 32.6
\[\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 simplification32.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around 0 19.9
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
- Recombined 4 regimes into one program.
Final simplification19.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;im \le -1.7153649862934488 \cdot 10^{+152}:\\
\;\;\;\;\log \left(\frac{-1}{re}\right) \cdot \frac{-1}{\log base}\\
\mathbf{elif}\;im \le -8.011125498683684 \cdot 10^{-143}:\\
\;\;\;\;\frac{1}{\log base \cdot \log base} \cdot \left(\log base \cdot \log \left(\sqrt{\sqrt{re \cdot re + im \cdot im}} \cdot \sqrt{\sqrt{re \cdot re + im \cdot im}}\right)\right)\\
\mathbf{elif}\;im \le 2.1516059334777307 \cdot 10^{-114}:\\
\;\;\;\;\frac{\log \left(-re\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\end{array}\]