- Split input into 3 regimes
if (/ -1 re) < -8.247320440816549e-87 or 1.3515321519533598e-130 < (/ -1 re)
Initial program 20.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}\]
- Using strategy
rm Applied add-cbrt-cube21.0
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \color{blue}{\sqrt[3]{\left(\log base \cdot \log base\right) \cdot \log base}} + 0 \cdot 0}\]
Applied add-cbrt-cube21.2
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 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 \cdot 0}\]
Applied cbrt-unprod21.0
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 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 \cdot 0}\]
Simplified21.0
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\sqrt[3]{\color{blue}{{\left(\log base\right)}^{3} \cdot {\left(\log base\right)}^{3}}} + 0 \cdot 0}\]
if -8.247320440816549e-87 < (/ -1 re) < 2.678391131807515e-309
Initial program 47.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}\]
Taylor expanded around inf 9.9
\[\leadsto \frac{\log \color{blue}{re} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
if 2.678391131807515e-309 < (/ -1 re) < 1.3515321519533598e-130
Initial program 56.2
\[\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 8.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}\]
Simplified8.6
\[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
- Recombined 3 regimes into one program.
Final simplification17.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;\frac{-1}{re} \le -8.247320440816549 \cdot 10^{-87}:\\
\;\;\;\;\frac{\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right) + 0 \cdot \tan^{-1}_* \frac{im}{re}}{0 \cdot 0 + \sqrt[3]{{\left(\log base\right)}^{3} \cdot {\left(\log base\right)}^{3}}}\\
\mathbf{elif}\;\frac{-1}{re} \le 2.678391131807515 \cdot 10^{-309}:\\
\;\;\;\;\frac{0 \cdot \tan^{-1}_* \frac{im}{re} + \log re \cdot \log base}{0 \cdot 0 + \log base \cdot \log base}\\
\mathbf{elif}\;\frac{-1}{re} \le 1.3515321519533598 \cdot 10^{-130}:\\
\;\;\;\;\frac{\log base \cdot \log \left(-re\right) + 0 \cdot \tan^{-1}_* \frac{im}{re}}{0 \cdot 0 + \log base \cdot \log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right) + 0 \cdot \tan^{-1}_* \frac{im}{re}}{0 \cdot 0 + \sqrt[3]{{\left(\log base\right)}^{3} \cdot {\left(\log base\right)}^{3}}}\\
\end{array}\]