- Split input into 3 regimes
if re < -5.9574811165202225e+125
Initial program 55.1
\[\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 simplification55.1
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/l*55.1
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
Taylor expanded around -inf 7.9
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)}}{\frac{\log base \cdot \log base}{\log base}}\]
Simplified7.9
\[\leadsto \frac{\log \color{blue}{\left(-re\right)}}{\frac{\log base \cdot \log base}{\log base}}\]
if -5.9574811165202225e+125 < re < 1.6372007532725882e+96
Initial program 21.1
\[\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.1
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/l*21.1
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
if 1.6372007532725882e+96 < re
Initial program 48.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 simplification48.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 associate-/l*48.4
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
- Using strategy
rm Applied div-inv48.4
\[\leadsto \color{blue}{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \frac{1}{\frac{\log base \cdot \log base}{\log base}}}\]
Taylor expanded around inf 9.5
\[\leadsto \color{blue}{\frac{\log \left(\frac{1}{re}\right)}{\log \left(\frac{1}{base}\right)}}\]
Simplified9.5
\[\leadsto \color{blue}{\frac{-\log re}{-\log base}}\]
- Recombined 3 regimes into one program.
Final simplification17.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -5.9574811165202225 \cdot 10^{+125}:\\
\;\;\;\;\frac{\log \left(-re\right)}{\frac{\log base \cdot \log base}{\log base}}\\
\mathbf{elif}\;re \le 1.6372007532725882 \cdot 10^{+96}:\\
\;\;\;\;\frac{\log \left(\sqrt{im \cdot im + re \cdot re}\right)}{\frac{\log base \cdot \log base}{\log base}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\log re}{-\log base}\\
\end{array}\]