- Split input into 3 regimes
if re < -7.123779293932832e+122
Initial program 54.7
\[\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 simplification54.7
\[\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)}}\]
Simplified8.3
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
- Using strategy
rm Applied add-log-exp8.4
\[\leadsto \color{blue}{\log \left(e^{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\right)}\]
if -7.123779293932832e+122 < re < -7.135212444301522e-170 or -3.4047603445478845e-240 < re
Initial program 18.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 simplification18.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 clear-num18.2
\[\leadsto \color{blue}{\frac{1}{\frac{\log base \cdot \log base}{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}}}\]
if -7.135212444301522e-170 < re < -3.4047603445478845e-240
Initial program 31.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 simplification31.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around 0 36.0
\[\leadsto \frac{\log \color{blue}{im} \cdot \log base}{\log base \cdot \log base}\]
- Recombined 3 regimes into one program.
Final simplification17.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -7.123779293932832 \cdot 10^{+122}:\\
\;\;\;\;\log \left(e^{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\right)\\
\mathbf{elif}\;re \le -7.135212444301522 \cdot 10^{-170} \lor \neg \left(re \le -3.4047603445478845 \cdot 10^{-240}\right):\\
\;\;\;\;\frac{1}{\frac{\log base \cdot \log base}{\log base \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im \cdot \log base}{\log base \cdot \log base}\\
\end{array}\]