- Split input into 3 regimes
if im < -3.950465317537182e+151 or -1.8195771354884505e-129 < im < 7.12313116146826e-111
Initial program 36.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 simplification36.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\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)}}\]
Simplified20.2
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
- Using strategy
rm Applied add-cube-cbrt20.2
\[\leadsto \frac{-1}{\log base} \cdot \log \color{blue}{\left(\left(\sqrt[3]{\frac{-1}{re}} \cdot \sqrt[3]{\frac{-1}{re}}\right) \cdot \sqrt[3]{\frac{-1}{re}}\right)}\]
Applied log-prod20.2
\[\leadsto \frac{-1}{\log base} \cdot \color{blue}{\left(\log \left(\sqrt[3]{\frac{-1}{re}} \cdot \sqrt[3]{\frac{-1}{re}}\right) + \log \left(\sqrt[3]{\frac{-1}{re}}\right)\right)}\]
Applied distribute-lft-in20.2
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\sqrt[3]{\frac{-1}{re}} \cdot \sqrt[3]{\frac{-1}{re}}\right) + \frac{-1}{\log base} \cdot \log \left(\sqrt[3]{\frac{-1}{re}}\right)}\]
- Using strategy
rm Applied pow1/320.2
\[\leadsto \frac{-1}{\log base} \cdot \log \left(\sqrt[3]{\frac{-1}{re}} \cdot \sqrt[3]{\frac{-1}{re}}\right) + \frac{-1}{\log base} \cdot \log \color{blue}{\left({\left(\frac{-1}{re}\right)}^{\frac{1}{3}}\right)}\]
if -3.950465317537182e+151 < im < -1.8195771354884505e-129 or 7.12313116146826e-111 < im < 1.0672993883914327e+108
Initial program 16.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 simplification16.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-frac16.7
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified16.7
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
if 1.0672993883914327e+108 < im
Initial program 51.9
\[\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 simplification51.9
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around 0 7.7
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
- Recombined 3 regimes into one program.
Final simplification16.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;im \le -3.950465317537182 \cdot 10^{+151}:\\
\;\;\;\;\log \left({\left(\frac{-1}{re}\right)}^{\frac{1}{3}}\right) \cdot \frac{-1}{\log base} + \log \left(\sqrt[3]{\frac{-1}{re}} \cdot \sqrt[3]{\frac{-1}{re}}\right) \cdot \frac{-1}{\log base}\\
\mathbf{elif}\;im \le -1.8195771354884505 \cdot 10^{-129}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{elif}\;im \le 7.12313116146826 \cdot 10^{-111}:\\
\;\;\;\;\log \left({\left(\frac{-1}{re}\right)}^{\frac{1}{3}}\right) \cdot \frac{-1}{\log base} + \log \left(\sqrt[3]{\frac{-1}{re}} \cdot \sqrt[3]{\frac{-1}{re}}\right) \cdot \frac{-1}{\log base}\\
\mathbf{elif}\;im \le 1.0672993883914327 \cdot 10^{+108}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\end{array}\]