- Split input into 5 regimes
if re < -2.2598324738165398e+116
Initial program 52.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}\]
Initial simplification52.2
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/l*52.2
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
Taylor expanded around -inf 62.7
\[\leadsto \color{blue}{-1 \cdot \frac{\log \left(\frac{-1}{re}\right)}{\log -1 - \log \left(\frac{-1}{base}\right)}}\]
Simplified8.7
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
if -2.2598324738165398e+116 < re < -8.120359948335902e-181
Initial program 17.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}\]
Initial simplification17.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/l*17.5
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
- Using strategy
rm Applied pow1/217.5
\[\leadsto \frac{\log \color{blue}{\left({\left(re \cdot re + im \cdot im\right)}^{\frac{1}{2}}\right)}}{\frac{\log base \cdot \log base}{\log base}}\]
Applied log-pow17.5
\[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \log \left(re \cdot re + im \cdot im\right)}}{\frac{\log base \cdot \log base}{\log base}}\]
Applied associate-/l*17.5
\[\leadsto \color{blue}{\frac{\frac{1}{2}}{\frac{\frac{\log base \cdot \log base}{\log base}}{\log \left(re \cdot re + im \cdot im\right)}}}\]
if -8.120359948335902e-181 < re < 2.2744559929173244e-276
Initial program 32.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}\]
Initial simplification32.5
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around 0 33.7
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
if 2.2744559929173244e-276 < re < 9.321905324645453e+141
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}{\log base \cdot \log base + 0 \cdot 0}\]
Initial simplification19.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/l*19.6
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
- Using strategy
rm Applied div-inv19.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\color{blue}{\left(\log base \cdot \log base\right) \cdot \frac{1}{\log base}}}\]
Applied pow1/219.6
\[\leadsto \frac{\log \color{blue}{\left({\left(re \cdot re + im \cdot im\right)}^{\frac{1}{2}}\right)}}{\left(\log base \cdot \log base\right) \cdot \frac{1}{\log base}}\]
Applied log-pow19.6
\[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \log \left(re \cdot re + im \cdot im\right)}}{\left(\log base \cdot \log base\right) \cdot \frac{1}{\log base}}\]
Applied times-frac19.7
\[\leadsto \color{blue}{\frac{\frac{1}{2}}{\log base \cdot \log base} \cdot \frac{\log \left(re \cdot re + im \cdot im\right)}{\frac{1}{\log base}}}\]
Simplified19.6
\[\leadsto \frac{\frac{1}{2}}{\log base \cdot \log base} \cdot \color{blue}{\left(\log \left(re \cdot re + im \cdot im\right) \cdot \log base\right)}\]
if 9.321905324645453e+141 < re
Initial program 58.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}\]
Initial simplification58.8
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/l*58.8
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\frac{\log base \cdot \log base}{\log base}}}\]
- Using strategy
rm Applied pow1/258.8
\[\leadsto \frac{\log \color{blue}{\left({\left(re \cdot re + im \cdot im\right)}^{\frac{1}{2}}\right)}}{\frac{\log base \cdot \log base}{\log base}}\]
Applied log-pow58.8
\[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \log \left(re \cdot re + im \cdot im\right)}}{\frac{\log base \cdot \log base}{\log base}}\]
Applied associate-/l*58.8
\[\leadsto \color{blue}{\frac{\frac{1}{2}}{\frac{\frac{\log base \cdot \log base}{\log base}}{\log \left(re \cdot re + im \cdot im\right)}}}\]
Taylor expanded around inf 7.4
\[\leadsto \frac{\frac{1}{2}}{\frac{\frac{\log base \cdot \log base}{\log base}}{\color{blue}{-2 \cdot \log \left(\frac{1}{re}\right)}}}\]
Simplified7.4
\[\leadsto \frac{\frac{1}{2}}{\frac{\frac{\log base \cdot \log base}{\log base}}{\color{blue}{\log re \cdot 2}}}\]
- Recombined 5 regimes into one program.
Final simplification17.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;re \le -2.2598324738165398 \cdot 10^{+116}:\\
\;\;\;\;\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)\\
\mathbf{elif}\;re \le -8.120359948335902 \cdot 10^{-181}:\\
\;\;\;\;\frac{\frac{1}{2}}{\frac{\frac{\log base \cdot \log base}{\log base}}{\log \left(im \cdot im + re \cdot re\right)}}\\
\mathbf{elif}\;re \le 2.2744559929173244 \cdot 10^{-276}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\mathbf{elif}\;re \le 9.321905324645453 \cdot 10^{+141}:\\
\;\;\;\;\left(\log base \cdot \log \left(im \cdot im + re \cdot re\right)\right) \cdot \frac{\frac{1}{2}}{\log base \cdot \log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{2}}{\frac{\frac{\log base \cdot \log base}{\log base}}{\log re \cdot 2}}\\
\end{array}\]