- Split input into 4 regimes
if (- re) < -4.402648364861606e+144
Initial program 60.0
\[\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}\]
Taylor expanded around inf 8.3
\[\leadsto \frac{\color{blue}{\log \left(\frac{1}{base}\right) \cdot \log \left(\frac{1}{re}\right)} + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Applied simplify8.2
\[\leadsto \color{blue}{\frac{\log re}{\log base} \cdot 1}\]
if -4.402648364861606e+144 < (- re) < -4.025957105797844e-252 or 9.008777105504111e-235 < (- re) < 1.8997768895150623e+112
Initial program 18.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}\]
- Using strategy
rm Applied add-sqr-sqrt18.9
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\color{blue}{\sqrt{\log base \cdot \log base + 0 \cdot 0} \cdot \sqrt{\log base \cdot \log base + 0 \cdot 0}}}\]
Applied *-un-lft-identity18.9
\[\leadsto \frac{\color{blue}{1 \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0\right)}}{\sqrt{\log base \cdot \log base + 0 \cdot 0} \cdot \sqrt{\log base \cdot \log base + 0 \cdot 0}}\]
Applied times-frac18.9
\[\leadsto \color{blue}{\frac{1}{\sqrt{\log base \cdot \log base + 0 \cdot 0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\sqrt{\log base \cdot \log base + 0 \cdot 0}}}\]
Applied simplify18.9
\[\leadsto \color{blue}{\frac{1}{\sqrt{\log base \cdot \log base}}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\sqrt{\log base \cdot \log base + 0 \cdot 0}}\]
Applied simplify18.9
\[\leadsto \frac{1}{\sqrt{\log base \cdot \log base}} \cdot \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\sqrt{\log base \cdot \log base}}}\]
if -4.025957105797844e-252 < (- re) < 9.008777105504111e-235
Initial program 31.2
\[\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}\]
Taylor expanded around 0 32.5
\[\leadsto \frac{\log \color{blue}{im} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Applied simplify32.5
\[\leadsto \color{blue}{\frac{\log base \cdot \log im}{\log base \cdot \log base}}\]
if 1.8997768895150623e+112 < (- re)
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}\]
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)}}\]
Applied simplify8.6
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
- Recombined 4 regimes into one program.
Applied simplify17.2
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;-re \le -4.402648364861606 \cdot 10^{+144}:\\
\;\;\;\;\frac{\log re}{\log base}\\
\mathbf{if}\;-re \le -4.025957105797844 \cdot 10^{-252}:\\
\;\;\;\;\frac{1}{\sqrt{\log base \cdot \log base}} \cdot \frac{\log base \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)}{\sqrt{\log base \cdot \log base}}\\
\mathbf{if}\;-re \le 9.008777105504111 \cdot 10^{-235}:\\
\;\;\;\;\frac{\log base \cdot \log im}{\log base \cdot \log base}\\
\mathbf{if}\;-re \le 1.8997768895150623 \cdot 10^{+112}:\\
\;\;\;\;\frac{1}{\sqrt{\log base \cdot \log base}} \cdot \frac{\log base \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)}{\sqrt{\log base \cdot \log base}}\\
\mathbf{else}:\\
\;\;\;\;\log \left(\frac{-1}{re}\right) \cdot \frac{-1}{\log base}\\
\end{array}}\]