- Split input into 2 regimes
if y.re < -2.269991855360599e+138 or 1.6876359176932924e+79 < y.re
Initial program 39.8
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
- Using strategy
rm Applied add-cube-cbrt39.9
\[\leadsto \frac{x.re \cdot y.re + x.im \cdot y.im}{\color{blue}{\left(\sqrt[3]{y.re \cdot y.re + y.im \cdot y.im} \cdot \sqrt[3]{y.re \cdot y.re + y.im \cdot y.im}\right) \cdot \sqrt[3]{y.re \cdot y.re + y.im \cdot y.im}}}\]
Applied *-un-lft-identity39.9
\[\leadsto \frac{\color{blue}{1 \cdot \left(x.re \cdot y.re + x.im \cdot y.im\right)}}{\left(\sqrt[3]{y.re \cdot y.re + y.im \cdot y.im} \cdot \sqrt[3]{y.re \cdot y.re + y.im \cdot y.im}\right) \cdot \sqrt[3]{y.re \cdot y.re + y.im \cdot y.im}}\]
Applied times-frac39.9
\[\leadsto \color{blue}{\frac{1}{\sqrt[3]{y.re \cdot y.re + y.im \cdot y.im} \cdot \sqrt[3]{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{x.re \cdot y.re + x.im \cdot y.im}{\sqrt[3]{y.re \cdot y.re + y.im \cdot y.im}}}\]
Taylor expanded around inf 16.4
\[\leadsto \color{blue}{\frac{y.im \cdot x.im}{{y.re}^{2}} + \frac{x.re}{y.re}}\]
if -2.269991855360599e+138 < y.re < 1.6876359176932924e+79
Initial program 17.5
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
- Using strategy
rm Applied add-sqr-sqrt17.5
\[\leadsto \frac{x.re \cdot y.re + x.im \cdot y.im}{\color{blue}{\sqrt{y.re \cdot y.re + y.im \cdot y.im} \cdot \sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
Applied *-un-lft-identity17.5
\[\leadsto \frac{\color{blue}{1 \cdot \left(x.re \cdot y.re + x.im \cdot y.im\right)}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im} \cdot \sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Applied times-frac17.5
\[\leadsto \color{blue}{\frac{1}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{x.re \cdot y.re + x.im \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
- Recombined 2 regimes into one program.
Final simplification17.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.re \le -2.269991855360599 \cdot 10^{+138} \lor \neg \left(y.re \le 1.6876359176932924 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x.re}{y.re} + \frac{y.im \cdot x.im}{{y.re}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{x.re \cdot y.re + y.im \cdot x.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\end{array}\]