- Split input into 3 regimes
if re < -4.546843496143031e+109
Initial program 51.3
\[\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.3
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied add-cbrt-cube51.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\color{blue}{\sqrt[3]{\left(\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right)\right) \cdot \left(\log base \cdot \log base\right)}}}\]
Applied add-cbrt-cube51.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \color{blue}{\sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base}}}{\sqrt[3]{\left(\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right)\right) \cdot \left(\log base \cdot \log base\right)}}\]
Applied add-cbrt-cube51.4
\[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)}} \cdot \sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base}}{\sqrt[3]{\left(\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right)\right) \cdot \left(\log base \cdot \log base\right)}}\]
Applied cbrt-unprod51.4
\[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \left(\left(\log base \cdot \log base\right) \cdot \log base\right)}}}{\sqrt[3]{\left(\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right)\right) \cdot \left(\log base \cdot \log base\right)}}\]
Applied cbrt-undiv51.4
\[\leadsto \color{blue}{\sqrt[3]{\frac{\left(\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \left(\left(\log base \cdot \log base\right) \cdot \log base\right)}{\left(\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right)\right) \cdot \left(\log base \cdot \log base\right)}}}\]
Simplified51.4
\[\leadsto \sqrt[3]{\color{blue}{\frac{{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right)\right)}^{3}}{\frac{\log base \cdot \log base}{\frac{1}{\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)}}\]
Simplified8.2
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
if -4.546843496143031e+109 < re < 3.4389244313109046e+40
Initial program 21.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 simplification21.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 div-inv21.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}}\]
if 3.4389244313109046e+40 < re
Initial program 41.3
\[\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 simplification41.3
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around inf 12.0
\[\leadsto \color{blue}{\frac{\log \left(\frac{1}{re}\right)}{\log \left(\frac{1}{base}\right)}}\]
Simplified12.0
\[\leadsto \color{blue}{\frac{-\log re}{-\log base}}\]
- Recombined 3 regimes into one program.
Final simplification17.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -4.546843496143031 \cdot 10^{+109}:\\
\;\;\;\;\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)\\
\mathbf{elif}\;re \le 3.4389244313109046 \cdot 10^{+40}:\\
\;\;\;\;\left(\log base \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)\right) \cdot \frac{1}{\log base \cdot \log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\log re}{-\log base}\\
\end{array}\]