- Split input into 3 regimes
if im < -1.3378009695161851e+154 or -3.7368973661738945e-101 < im < 1.9349690822092957e-164
Initial program 39.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}\]
Initial simplification39.1
\[\leadsto \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 \frac{\color{blue}{-1 \cdot \left(\log \left(\frac{-1}{re}\right) \cdot \left(\log -1 - \log \left(\frac{-1}{base}\right)\right)\right)}}{\log base \cdot \log base}\]
Simplified21.2
\[\leadsto \frac{\color{blue}{\left(-\log base\right) \cdot \log \left(\frac{-1}{re}\right)}}{\log base \cdot \log base}\]
if -1.3378009695161851e+154 < im < -3.7368973661738945e-101 or 1.9349690822092957e-164 < im < 5.238375664691967e+86
Initial program 16.3
\[\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 simplification16.3
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied times-frac16.2
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified16.2
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
if 5.238375664691967e+86 < im
Initial program 47.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 simplification47.6
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around 0 9.8
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
- Recombined 3 regimes into one program.
Final simplification17.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;im \le -1.3378009695161851 \cdot 10^{+154}:\\
\;\;\;\;\frac{\log \left(\frac{-1}{re}\right) \cdot \left(-\log base\right)}{\log base \cdot \log base}\\
\mathbf{elif}\;im \le -3.7368973661738945 \cdot 10^{-101}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{elif}\;im \le 1.9349690822092957 \cdot 10^{-164}:\\
\;\;\;\;\frac{\log \left(\frac{-1}{re}\right) \cdot \left(-\log base\right)}{\log base \cdot \log base}\\
\mathbf{elif}\;im \le 5.238375664691967 \cdot 10^{+86}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\end{array}\]