- Split input into 4 regimes
if im < -9.254070271474318e+157
Initial program 62.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}\]
Simplified62.0
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}}\]
- Using strategy
rm Applied div-inv62.0
\[\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}}\]
- Using strategy
rm Applied associate-*l*62.0
\[\leadsto \color{blue}{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)}\]
Taylor expanded around -inf 49.8
\[\leadsto \log \color{blue}{\left(-1 \cdot re\right)} \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)\]
Simplified49.8
\[\leadsto \log \color{blue}{\left(-re\right)} \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)\]
if -9.254070271474318e+157 < im < -2.8360739299980355e-74 or 2.87570452156065e-149 < im < 6.978321740802736e+74
Initial program 15.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}\]
Simplified15.4
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}}\]
- Using strategy
rm Applied div-inv15.4
\[\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}}\]
- Using strategy
rm Applied associate-*l*15.4
\[\leadsto \color{blue}{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)}\]
if -2.8360739299980355e-74 < im < 2.87570452156065e-149
Initial program 26.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}\]
Simplified26.6
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}}\]
- Using strategy
rm Applied div-inv26.6
\[\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}}\]
- Using strategy
rm Applied associate-*l*26.6
\[\leadsto \color{blue}{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)}\]
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.5
\[\leadsto \color{blue}{-\frac{\log \left(\frac{-1}{re}\right)}{\log base}}\]
if 6.978321740802736e+74 < im
Initial program 45.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}\]
Simplified45.1
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}}\]
Taylor expanded around 0 10.0
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
- Recombined 4 regimes into one program.
Final simplification16.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;im \le -9.254070271474318 \cdot 10^{+157}:\\
\;\;\;\;\log \left(-re\right) \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)\\
\mathbf{elif}\;im \le -2.8360739299980355 \cdot 10^{-74}:\\
\;\;\;\;\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)\\
\mathbf{elif}\;im \le 2.87570452156065 \cdot 10^{-149}:\\
\;\;\;\;\frac{-\log \left(\frac{-1}{re}\right)}{\log base}\\
\mathbf{elif}\;im \le 6.978321740802736 \cdot 10^{+74}:\\
\;\;\;\;\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \left(\log base \cdot \frac{1}{\log base \cdot \log base}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\end{array}\]