- Split input into 3 regimes
if x.re < -5.377433267083034e-05
Initial program 38.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 21.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}\]
Taylor expanded around -inf 1.0
\[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.re\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
Simplified1.0
\[\leadsto e^{\log \color{blue}{\left(-x.re\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
- Using strategy
rm Applied add-cube-cbrt1.0
\[\leadsto e^{\color{blue}{\left(\sqrt[3]{\log \left(-x.re\right) \cdot y.re} \cdot \sqrt[3]{\log \left(-x.re\right) \cdot y.re}\right) \cdot \sqrt[3]{\log \left(-x.re\right) \cdot y.re}} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
- Using strategy
rm Applied add-cbrt-cube1.0
\[\leadsto e^{\left(\sqrt[3]{\log \left(-x.re\right) \cdot y.re} \cdot \sqrt[3]{\log \left(-x.re\right) \cdot y.re}\right) \cdot \color{blue}{\sqrt[3]{\left(\sqrt[3]{\log \left(-x.re\right) \cdot y.re} \cdot \sqrt[3]{\log \left(-x.re\right) \cdot y.re}\right) \cdot \sqrt[3]{\log \left(-x.re\right) \cdot y.re}}} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
if -5.377433267083034e-05 < x.re < 6.378265787440455e-299
Initial program 24.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 13.1
\[\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}\]
if 6.378265787440455e-299 < x.re
Initial program 34.3
\[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 21.3
\[\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 12.0
\[\leadsto e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.re}\right)\right)} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
Simplified12.0
\[\leadsto e^{\color{blue}{y.re \cdot \log x.re} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
- Recombined 3 regimes into one program.
Final simplification9.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;x.re \le -5.377433267083034 \cdot 10^{-05}:\\
\;\;\;\;e^{\left(\sqrt[3]{\log \left(-x.re\right) \cdot y.re} \cdot \sqrt[3]{\log \left(-x.re\right) \cdot y.re}\right) \cdot \sqrt[3]{\sqrt[3]{\log \left(-x.re\right) \cdot y.re} \cdot \left(\sqrt[3]{\log \left(-x.re\right) \cdot y.re} \cdot \sqrt[3]{\log \left(-x.re\right) \cdot y.re}\right)} - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;x.re \le 6.378265787440455 \cdot 10^{-299}:\\
\;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;e^{\log x.re \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}\]