- Split input into 4 regimes
if im < -2.453006355026506e+98
Initial program 51.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}\]
Simplified51.6
\[\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)}}\]
Simplified49.0
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
- Using strategy
rm Applied add-cbrt-cube49.1
\[\leadsto \frac{-1}{\log base} \cdot \color{blue}{\sqrt[3]{\left(\log \left(\frac{-1}{re}\right) \cdot \log \left(\frac{-1}{re}\right)\right) \cdot \log \left(\frac{-1}{re}\right)}}\]
if -2.453006355026506e+98 < im < -4.584334208320103 or 4.2734741656329414e-44 < im < 2.8251957203945042e+68
Initial program 15.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}\]
Simplified15.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-inv15.7
\[\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}}\]
if -4.584334208320103 < im < 4.2734741656329414e-44
Initial program 23.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}\]
Simplified23.5
\[\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)}}\]
Simplified12.5
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
Taylor expanded around -inf 12.5
\[\leadsto \frac{-1}{\log base} \cdot \color{blue}{\log \left(\frac{-1}{re}\right)}\]
if 2.8251957203945042e+68 < im
Initial program 46.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}\]
Simplified46.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.2
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
- Recombined 4 regimes into one program.
Final simplification18.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;im \le -2.453006355026506 \cdot 10^{+98}:\\
\;\;\;\;\sqrt[3]{\log \left(\frac{-1}{re}\right) \cdot \left(\log \left(\frac{-1}{re}\right) \cdot \log \left(\frac{-1}{re}\right)\right)} \cdot \frac{-1}{\log base}\\
\mathbf{elif}\;im \le -4.584334208320103:\\
\;\;\;\;\left(\log base \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)\right) \cdot \frac{1}{\log base \cdot \log base}\\
\mathbf{elif}\;im \le 4.2734741656329414 \cdot 10^{-44}:\\
\;\;\;\;\log \left(\frac{-1}{re}\right) \cdot \frac{-1}{\log base}\\
\mathbf{elif}\;im \le 2.8251957203945042 \cdot 10^{+68}:\\
\;\;\;\;\left(\log base \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)\right) \cdot \frac{1}{\log base \cdot \log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\end{array}\]