- Split input into 4 regimes
if im < -1.350005061623872e+154
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}}\]
Taylor expanded around -inf 50.8
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base}{\log base \cdot \log base}\]
Simplified50.8
\[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied clear-num50.8
\[\leadsto \color{blue}{\frac{1}{\frac{\log base \cdot \log base}{\log \left(-re\right) \cdot \log base}}}\]
if -1.350005061623872e+154 < im < -2.998808339031573e-73 or 5.750493638946934e-114 < im < 3.643193318053519e+119
Initial program 15.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}\]
Simplified15.7
\[\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 times-frac15.7
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified15.7
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
if -2.998808339031573e-73 < im < 5.750493638946934e-114
Initial program 25.8
\[\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}\]
Simplified25.8
\[\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 -inf 9.5
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base}{\log base \cdot \log base}\]
Simplified9.5
\[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/l*9.4
\[\leadsto \color{blue}{\frac{\log \left(-re\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
if 3.643193318053519e+119 < im
Initial program 53.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}\]
Simplified53.3
\[\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 8.2
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
- Recombined 4 regimes into one program.
Final simplification16.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;im \le -1.350005061623872 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\frac{\log base \cdot \log base}{\log \left(-re\right) \cdot \log base}}\\
\mathbf{elif}\;im \le -2.998808339031573 \cdot 10^{-73}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{elif}\;im \le 5.750493638946934 \cdot 10^{-114}:\\
\;\;\;\;\frac{\log \left(-re\right)}{\frac{\log base \cdot \log base}{\log base}}\\
\mathbf{elif}\;im \le 3.643193318053519 \cdot 10^{+119}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\end{array}\]