- Split input into 4 regimes
if x.im < -1.6666144695324475e+157 or -2.317071040327287e-154 < x.im < -2.4766512115837237e-222 or -5.110982781221942e-290 < x.im < 1.60724677888386e-310
Initial program 51.5
\[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 27.8
\[\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}\]
Applied simplify31.6
\[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}}\]
Taylor expanded around -inf 13.6
\[\leadsto {\color{blue}{\left(-1 \cdot x.im\right)}}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\]
Applied simplify13.8
\[\leadsto \color{blue}{\frac{{\left(-x.im\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}}\]
if -1.6666144695324475e+157 < x.im < -2.317071040327287e-154 or -2.4766512115837237e-222 < x.im < -5.110982781221942e-290
Initial program 20.7
\[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 13.8
\[\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}\]
Applied simplify18.6
\[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}}\]
- Using strategy
rm Applied add-exp-log18.6
\[\leadsto {\color{blue}{\left(e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}\right)}}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\]
Applied pow-exp18.6
\[\leadsto \color{blue}{e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re}} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\]
Applied prod-exp13.8
\[\leadsto \color{blue}{e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re + \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}}\]
Applied simplify13.8
\[\leadsto e^{\color{blue}{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\]
if 1.60724677888386e-310 < x.im < 1.713707274235917e-142 or 1.2876188257639362e+90 < x.im
Initial program 40.5
\[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 24.4
\[\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}\]
Applied simplify28.2
\[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}}\]
Taylor expanded around inf 12.8
\[\leadsto {\color{blue}{x.im}}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\]
Applied simplify13.3
\[\leadsto \color{blue}{\frac{{x.im}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}}\]
- Using strategy
rm Applied add-log-exp13.3
\[\leadsto \color{blue}{\log \left(e^{\frac{{x.im}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right)}\]
if 1.713707274235917e-142 < x.im < 1.2876188257639362e+90
Initial program 16.9
\[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 10.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 \cos \left(\log \color{blue}{x.im} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
- Recombined 4 regimes into one program.
Applied simplify13.0
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;x.im \le -1.6666144695324475 \cdot 10^{+157}:\\
\;\;\;\;\frac{{\left(-x.im\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}\\
\mathbf{if}\;x.im \le -2.317071040327287 \cdot 10^{-154}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;x.im \le -2.4766512115837237 \cdot 10^{-222}:\\
\;\;\;\;\frac{{\left(-x.im\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}\\
\mathbf{if}\;x.im \le -5.110982781221942 \cdot 10^{-290}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;x.im \le 1.60724677888386 \cdot 10^{-310}:\\
\;\;\;\;\frac{{\left(-x.im\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}\\
\mathbf{if}\;x.im \le 1.713707274235917 \cdot 10^{-142} \lor \neg \left(x.im \le 1.2876188257639362 \cdot 10^{+90}\right):\\
\;\;\;\;\log \left(e^{\frac{{x.im}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log x.im \cdot y.im\right)\\
\end{array}}\]