- Split input into 2 regimes
if re < -5.674021524470861e+100
Initial program 50.9
\[\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}\]
Simplified50.9
\[\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 62.8
\[\leadsto \color{blue}{-1 \cdot \frac{\log \left(\frac{-1}{re}\right)}{\log -1 - \log \left(\frac{-1}{base}\right)}}\]
Simplified9.8
\[\leadsto \color{blue}{-\frac{\log \left(\frac{-1}{re}\right)}{\log base}}\]
- Using strategy
rm Applied clear-num9.8
\[\leadsto -\color{blue}{\frac{1}{\frac{\log base}{\log \left(\frac{-1}{re}\right)}}}\]
Taylor expanded around -inf 62.8
\[\leadsto -\color{blue}{\frac{\log \left(\frac{-1}{re}\right)}{\log -1 - \log \left(\frac{-1}{base}\right)}}\]
Simplified9.8
\[\leadsto -\color{blue}{\frac{\log \left(\frac{-1}{re}\right)}{\log base}}\]
if -5.674021524470861e+100 < re
Initial program 21.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}\]
Simplified21.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 times-frac21.4
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified21.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
- Recombined 2 regimes into one program.
Final simplification17.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -5.674021524470861 \cdot 10^{+100}:\\
\;\;\;\;\frac{-\log \left(\frac{-1}{re}\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log \left(\sqrt{im \cdot im + re \cdot re}\right)}{\log base}\\
\end{array}\]