- Split input into 3 regimes
if re < -1.9170398312148682e+119
Initial program 53.5
\[\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 simplification53.5
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied times-frac53.5
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified53.5
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
Taylor expanded around -inf 7.7
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)}}{\log base} \cdot 1\]
Simplified7.7
\[\leadsto \frac{\log \color{blue}{\left(-re\right)}}{\log base} \cdot 1\]
if -1.9170398312148682e+119 < re < 3.1963042909014515e+51
Initial program 21.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}\]
Initial simplification21.0
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied times-frac20.9
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified20.9
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
- Using strategy
rm Applied div-inv20.9
\[\leadsto \color{blue}{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \frac{1}{\log base}\right)} \cdot 1\]
if 3.1963042909014515e+51 < re
Initial program 44.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 simplification44.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 times-frac44.4
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified44.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
Taylor expanded around inf 11.7
\[\leadsto \frac{\log \color{blue}{re}}{\log base} \cdot 1\]
- Recombined 3 regimes into one program.
Final simplification16.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -1.9170398312148682 \cdot 10^{+119}:\\
\;\;\;\;\frac{\log \left(-re\right)}{\log base}\\
\mathbf{elif}\;re \le 3.1963042909014515 \cdot 10^{+51}:\\
\;\;\;\;\frac{1}{\log base} \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\log re}{\log base}\\
\end{array}\]