- Split input into 4 regimes
if re < -3.46186942740825347e91
Initial program 51.4
\[\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-cube-cbrt51.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 \log \color{blue}{\left(\left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) \cdot \sqrt[3]{base}\right)} + 0.0 \cdot 0.0}\]
Applied log-prod51.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}{\left(\log \left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) + \log \left(\sqrt[3]{base}\right)\right)} + 0.0 \cdot 0.0}\]
Applied distribute-lft-in51.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}{\left(\log base \cdot \log \left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) + \log base \cdot \log \left(\sqrt[3]{base}\right)\right)} + 0.0 \cdot 0.0}\]
Simplified51.4
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\color{blue}{2 \cdot \left(\log base \cdot \log \left(\sqrt[3]{base}\right)\right)} + \log base \cdot \log \left(\sqrt[3]{base}\right)\right) + 0.0 \cdot 0.0}\]
Taylor expanded around -inf 9.6
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(2 \cdot \left(\log base \cdot \log \left(\sqrt[3]{base}\right)\right) + \log base \cdot \log \left(\sqrt[3]{base}\right)\right) + 0.0 \cdot 0.0}\]
Simplified9.6
\[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(2 \cdot \left(\log base \cdot \log \left(\sqrt[3]{base}\right)\right) + \log base \cdot \log \left(\sqrt[3]{base}\right)\right) + 0.0 \cdot 0.0}\]
if -3.46186942740825347e91 < re < -3.6142519675909714e-198 or 1.09305946911323656e-271 < re < 2.14368816692774462e121
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 flip-+19.3
\[\leadsto \frac{\color{blue}{\frac{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) - \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right) \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}{\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}\]
Applied associate-/l/19.3
\[\leadsto \color{blue}{\frac{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) - \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right) \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}{\left(\log base \cdot \log base + 0.0 \cdot 0.0\right) \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base - \tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}}\]
Simplified19.3
\[\leadsto \frac{\left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base\right) - \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right) \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}{\color{blue}{\left({\left(\log base\right)}^{2} + 0.0 \cdot 0.0\right) \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base - \tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}}\]
if -3.6142519675909714e-198 < re < 1.09305946911323656e-271
Initial program 31.8
\[\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 32.8
\[\leadsto \color{blue}{\frac{\log 1 + \log im}{\log 1 + \log base}}\]
Simplified32.8
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
if 2.14368816692774462e121 < re
Initial program 55.9
\[\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 7.8
\[\leadsto \color{blue}{\frac{\log 1 - \log \left(\frac{1}{re}\right)}{\log 1 - \log \left(\frac{1}{base}\right)}}\]
Simplified7.8
\[\leadsto \color{blue}{\frac{\log re}{\log base}}\]
- Recombined 4 regimes into one program.
Final simplification17.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -3.46186942740825347 \cdot 10^{91}:\\
\;\;\;\;\frac{\log \left(-re\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\log base \cdot \log \left(\sqrt[3]{base}\right) + 2 \cdot \left(\log base \cdot \log \left(\sqrt[3]{base}\right)\right)\right) + 0.0 \cdot 0.0}\\
\mathbf{elif}\;re \le -3.6142519675909714 \cdot 10^{-198}:\\
\;\;\;\;\frac{\left(\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \left(\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) - \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right) \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}{\left(0.0 \cdot 0.0 + {\left(\log base\right)}^{2}\right) \cdot \left(\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right) - \tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}\\
\mathbf{elif}\;re \le 1.09305946911323656 \cdot 10^{-271}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\mathbf{elif}\;re \le 2.14368816692774462 \cdot 10^{121}:\\
\;\;\;\;\frac{\left(\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) \cdot \left(\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)\right) - \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right) \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}{\left(0.0 \cdot 0.0 + {\left(\log base\right)}^{2}\right) \cdot \left(\log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right) - \tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log re}{\log base}\\
\end{array}\]