- Split input into 3 regimes
if y.re < -1608.94408824502466
Initial program 36.2
\[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Taylor expanded around 0 0.6
\[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{1}\]
- Using strategy
rm Applied add-log-exp2.4
\[\leadsto e^{\log \color{blue}{\left(\log \left(e^{\sqrt{x.re \cdot x.re + x.im \cdot x.im}}\right)\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
if -1608.94408824502466 < y.re < 4.1576628687891882e80
Initial program 34.0
\[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Taylor expanded around 0 29.2
\[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{1}\]
Taylor expanded around -inf 33.9
\[\leadsto \color{blue}{e^{y.re \cdot \log 1 - \left(y.re \cdot \log \left(\frac{-1}{x.re}\right) + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot 1\]
Simplified33.5
\[\leadsto \color{blue}{\frac{{\left(\frac{x.re}{-1}\right)}^{y.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \cdot 1\]
- Using strategy
rm Applied add-exp-log33.5
\[\leadsto \frac{\color{blue}{e^{\log \left({\left(\frac{x.re}{-1}\right)}^{y.re}\right)}}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot 1\]
Applied div-exp33.4
\[\leadsto \color{blue}{e^{\log \left({\left(\frac{x.re}{-1}\right)}^{y.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot 1\]
Taylor expanded around inf 8.3
\[\leadsto e^{\color{blue}{0} - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot 1\]
if 4.1576628687891882e80 < y.re
Initial program 17.4
\[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
Taylor expanded around 0 6.5
\[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{1}\]
Taylor expanded around -inf 30.3
\[\leadsto \color{blue}{e^{y.re \cdot \log 1 - \left(y.re \cdot \log \left(\frac{-1}{x.re}\right) + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot 1\]
Simplified13.8
\[\leadsto \color{blue}{\frac{{\left(\frac{x.re}{-1}\right)}^{y.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \cdot 1\]
Taylor expanded around 0 6.7
\[\leadsto \frac{{\left(\frac{x.re}{-1}\right)}^{y.re}}{\color{blue}{1 + \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + \frac{1}{2} \cdot \left({y.im}^{2} \cdot {\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}\right)\right)}} \cdot 1\]
Simplified5.1
\[\leadsto \frac{{\left(\frac{x.re}{-1}\right)}^{y.re}}{\color{blue}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.im + \left(\frac{1}{2} \cdot {y.im}^{2}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot 1\]
- Recombined 3 regimes into one program.
Final simplification6.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.re \le -1608.94408824502466:\\
\;\;\;\;e^{\log \left(\log \left(e^{\sqrt{x.re \cdot x.re + x.im \cdot x.im}}\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;y.re \le 4.1576628687891882 \cdot 10^{80}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{x.re}{-1}\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.im + \left(\frac{1}{2} \cdot {y.im}^{2}\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}\]