- Split input into 5 regimes
if re < -2.0752208244632336e60
Initial program 45.2
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
Taylor expanded around -inf 10.5
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
Simplified10.5
\[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
if -2.0752208244632336e60 < re < -2.88208828919163744e-308
Initial program 22.3
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
- Using strategy
rm Applied add-cbrt-cube22.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \color{blue}{\sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base}} + 0.0 \cdot 0.0}\]
Applied add-cbrt-cube22.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\color{blue}{\sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base}} \cdot \sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base} + 0.0 \cdot 0.0}\]
Applied cbrt-unprod22.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\color{blue}{\sqrt[3]{\left(\left(\log base \cdot \log base\right) \cdot \log base\right) \cdot \left(\left(\log base \cdot \log base\right) \cdot \log base\right)}} + 0.0 \cdot 0.0}\]
Simplified22.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt[3]{\color{blue}{{\left(\log base\right)}^{6}}} + 0.0 \cdot 0.0}\]
if -2.88208828919163744e-308 < re < 1.0126300995154855e-212
Initial program 34.0
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
Taylor expanded around 0 34.1
\[\leadsto \color{blue}{\frac{\log 1 + \log im}{\log 1 + \log base}}\]
Simplified34.1
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
if 1.0126300995154855e-212 < re < 3.36626267455570162e37
Initial program 19.6
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
- Using strategy
rm Applied add-cbrt-cube19.8
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \color{blue}{\sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base}} + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
Applied add-cbrt-cube19.9
\[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)}} \cdot \sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base} + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
Applied cbrt-unprod19.8
\[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \left(\left(\log base \cdot \log base\right) \cdot \log base\right)}} + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
Simplified19.8
\[\leadsto \frac{\sqrt[3]{\color{blue}{{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right)}^{3}}} + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
if 3.36626267455570162e37 < re
Initial program 43.2
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
Taylor expanded around inf 11.4
\[\leadsto \frac{\log \color{blue}{re} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
- Recombined 5 regimes into one program.
Final simplification17.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -2.0752208244632336 \cdot 10^{60}:\\
\;\;\;\;\frac{\log \left(-re\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\\
\mathbf{elif}\;re \le -2.88208828919163744 \cdot 10^{-308}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt[3]{{\left(\log base\right)}^{6}} + 0.0 \cdot 0.0}\\
\mathbf{elif}\;re \le 1.0126300995154855 \cdot 10^{-212}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\mathbf{elif}\;re \le 3.36626267455570162 \cdot 10^{37}:\\
\;\;\;\;\frac{\sqrt[3]{{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right)}^{3}} + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log re \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\\
\end{array}\]