- Split input into 4 regimes
if (/ -1 re) < -1.500742405561593e-129
Initial program 21.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}\]
- Using strategy
rm Applied flip-+21.9
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\color{blue}{\frac{\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right) - \left(0 \cdot 0\right) \cdot \left(0 \cdot 0\right)}{\log base \cdot \log base - 0 \cdot 0}}}\]
Applied associate-/r/22.0
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right) - \left(0 \cdot 0\right) \cdot \left(0 \cdot 0\right)} \cdot \left(\log base \cdot \log base - 0 \cdot 0\right)}\]
Applied simplify21.9
\[\leadsto \color{blue}{\left(\log \left(\sqrt{im \cdot im + re \cdot re}\right) \cdot \frac{\frac{1}{\log base}}{\log base \cdot \log base}\right)} \cdot \left(\log base \cdot \log base - 0 \cdot 0\right)\]
if -1.500742405561593e-129 < (/ -1 re) < -6.1365481070341966e-304
Initial program 55.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}\]
Taylor expanded around inf 7.6
\[\leadsto \frac{\color{blue}{\log \left(\frac{1}{re}\right) \cdot \log \left(\frac{1}{base}\right)} + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Applied simplify7.5
\[\leadsto \color{blue}{1 \cdot \frac{\log re}{\log base}}\]
if -6.1365481070341966e-304 < (/ -1 re) < 1.2013426161859356e-50
Initial program 44.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}\]
Taylor expanded around -inf 12.6
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Applied simplify12.5
\[\leadsto \color{blue}{\frac{\log \left(-re\right)}{\log base}}\]
if 1.2013426161859356e-50 < (/ -1 re)
Initial program 21.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}\]
- Using strategy
rm Applied flip-+21.7
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\color{blue}{\frac{\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right) - \left(0 \cdot 0\right) \cdot \left(0 \cdot 0\right)}{\log base \cdot \log base - 0 \cdot 0}}}\]
Applied associate-/r/21.7
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\left(\log base \cdot \log base\right) \cdot \left(\log base \cdot \log base\right) - \left(0 \cdot 0\right) \cdot \left(0 \cdot 0\right)} \cdot \left(\log base \cdot \log base - 0 \cdot 0\right)}\]
Applied simplify21.7
\[\leadsto \color{blue}{\left(\log \left(\sqrt{im \cdot im + re \cdot re}\right) \cdot \frac{\frac{1}{\log base}}{\log base \cdot \log base}\right)} \cdot \left(\log base \cdot \log base - 0 \cdot 0\right)\]
- Recombined 4 regimes into one program.
Applied simplify17.7
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;\frac{-1}{re} \le -1.500742405561593 \cdot 10^{-129}:\\
\;\;\;\;\left(\log \left(\sqrt{im \cdot im + re \cdot re}\right) \cdot \frac{\frac{1}{\log base}}{\log base \cdot \log base}\right) \cdot \left(\log base \cdot \log base - 0 \cdot 0\right)\\
\mathbf{if}\;\frac{-1}{re} \le -6.1365481070341966 \cdot 10^{-304}:\\
\;\;\;\;\frac{\log re}{\log base}\\
\mathbf{if}\;\frac{-1}{re} \le 1.2013426161859356 \cdot 10^{-50}:\\
\;\;\;\;\frac{\log \left(-re\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(\sqrt{im \cdot im + re \cdot re}\right) \cdot \frac{\frac{1}{\log base}}{\log base \cdot \log base}\right) \cdot \left(\log base \cdot \log base - 0 \cdot 0\right)\\
\end{array}}\]