- Split input into 3 regimes
if x.re < -1.5012357512019892e+38 or -2.6613588622387143e-130 < x.re < -1.00100197004107e-310
Initial program 37.6
\[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.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 5.3
\[\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\]
Simplified5.3
\[\leadsto e^{\log \color{blue}{\left(-x.re\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
if -1.5012357512019892e+38 < x.re < -2.6613588622387143e-130
Initial program 15.6
\[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 9.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}\]
if -1.00100197004107e-310 < x.re
Initial program 34.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 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 11.9
\[\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\]
Simplified11.9
\[\leadsto e^{\color{blue}{y.re \cdot \log x.re} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
- Using strategy
rm Applied add-cube-cbrt11.9
\[\leadsto e^{y.re \cdot \color{blue}{\left(\left(\sqrt[3]{\log x.re} \cdot \sqrt[3]{\log x.re}\right) \cdot \sqrt[3]{\log x.re}\right)} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
Applied associate-*r*11.9
\[\leadsto e^{\color{blue}{\left(y.re \cdot \left(\sqrt[3]{\log x.re} \cdot \sqrt[3]{\log x.re}\right)\right) \cdot \sqrt[3]{\log x.re}} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\]
- Recombined 3 regimes into one program.
Final simplification9.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;x.re \le -1.5012357512019892 \cdot 10^{+38}:\\
\;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{elif}\;x.re \le -2.6613588622387143 \cdot 10^{-130}:\\
\;\;\;\;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{elif}\;x.re \le -1.00100197004107 \cdot 10^{-310}:\\
\;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;e^{\sqrt[3]{\log x.re} \cdot \left(y.re \cdot \left(\sqrt[3]{\log x.re} \cdot \sqrt[3]{\log x.re}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}\]