- Split input into 4 regimes
if im < -1.6745060915852127e+177
Initial program 62.0
\[\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 simplification62.0
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around -inf 52.5
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base}{\log base \cdot \log base}\]
Simplified52.5
\[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base}{\log base \cdot \log base}\]
- Using strategy
rm Applied associate-/r*52.5
\[\leadsto \color{blue}{\frac{\frac{\log \left(-re\right) \cdot \log base}{\log base}}{\log base}}\]
if -1.6745060915852127e+177 < im < -1.310395801393896e-93 or 1.0295992518812972e-141 < im < 5.27718310843001e+94
Initial program 18.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 simplification18.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 times-frac18.2
\[\leadsto \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \frac{\log base}{\log base}}\]
Simplified18.2
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base} \cdot \color{blue}{1}\]
if -1.310395801393896e-93 < im < 1.0295992518812972e-141
Initial program 27.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 simplification27.2
\[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around -inf 8.9
\[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base}{\log base \cdot \log base}\]
Simplified8.9
\[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base}{\log base \cdot \log base}\]
Taylor expanded around -inf 62.8
\[\leadsto \color{blue}{-1 \cdot \frac{\log \left(\frac{-1}{re}\right)}{\log -1 - \log \left(\frac{-1}{base}\right)}}\]
Simplified8.9
\[\leadsto \color{blue}{\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)}\]
if 5.27718310843001e+94 < im
Initial program 49.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 simplification49.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.2
\[\leadsto \color{blue}{\frac{\log im}{\log base}}\]
- Recombined 4 regimes into one program.
Final simplification17.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;im \le -1.6745060915852127 \cdot 10^{+177}:\\
\;\;\;\;\frac{\frac{\log base \cdot \log \left(-re\right)}{\log base}}{\log base}\\
\mathbf{elif}\;im \le -1.310395801393896 \cdot 10^{-93}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{elif}\;im \le 1.0295992518812972 \cdot 10^{-141}:\\
\;\;\;\;\frac{-1}{\log base} \cdot \log \left(\frac{-1}{re}\right)\\
\mathbf{elif}\;im \le 5.27718310843001 \cdot 10^{+94}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log base}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log im}{\log base}\\
\end{array}\]