- Split input into 2 regimes
if y.im < 3.8596766955000655e+174
Initial program 23.7
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified23.7
\[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]
- Using strategy
rm Applied add-sqr-sqrt23.7
\[\leadsto \frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*} \cdot \sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}\]
Applied associate-/r*23.6
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}\]
- Using strategy
rm Applied fma-udef23.6
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]
Applied hypot-def23.6
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{y.im^2 + y.re^2}^*}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]
- Using strategy
rm Applied fma-udef23.6
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.im^2 + y.re^2}^*}}{\sqrt{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}}}\]
Applied hypot-def15.1
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.im^2 + y.re^2}^*}}{\color{blue}{\sqrt{y.im^2 + y.re^2}^*}}\]
- Using strategy
rm Applied div-sub15.1
\[\leadsto \frac{\color{blue}{\frac{x.im \cdot y.re}{\sqrt{y.im^2 + y.re^2}^*} - \frac{x.re \cdot y.im}{\sqrt{y.im^2 + y.re^2}^*}}}{\sqrt{y.im^2 + y.re^2}^*}\]
Applied div-sub15.1
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.re}{\sqrt{y.im^2 + y.re^2}^*}}{\sqrt{y.im^2 + y.re^2}^*} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.im^2 + y.re^2}^*}}{\sqrt{y.im^2 + y.re^2}^*}}\]
if 3.8596766955000655e+174 < y.im
Initial program 44.5
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified44.5
\[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]
- Using strategy
rm Applied add-sqr-sqrt44.5
\[\leadsto \frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*} \cdot \sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}\]
Applied associate-/r*44.5
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}\]
- Using strategy
rm Applied fma-udef44.5
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]
Applied hypot-def44.5
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{y.im^2 + y.re^2}^*}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\]
- Using strategy
rm Applied fma-udef44.5
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.im^2 + y.re^2}^*}}{\sqrt{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}}}\]
Applied hypot-def31.1
\[\leadsto \frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.im^2 + y.re^2}^*}}{\color{blue}{\sqrt{y.im^2 + y.re^2}^*}}\]
Taylor expanded around 0 11.5
\[\leadsto \frac{\color{blue}{-1 \cdot x.re}}{\sqrt{y.im^2 + y.re^2}^*}\]
Simplified11.5
\[\leadsto \frac{\color{blue}{-x.re}}{\sqrt{y.im^2 + y.re^2}^*}\]
- Recombined 2 regimes into one program.
Final simplification14.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.im \le 3.8596766955000655 \cdot 10^{+174}:\\
\;\;\;\;\frac{\frac{x.im \cdot y.re}{\sqrt{y.im^2 + y.re^2}^*}}{\sqrt{y.im^2 + y.re^2}^*} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.im^2 + y.re^2}^*}}{\sqrt{y.im^2 + y.re^2}^*}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{\sqrt{y.im^2 + y.re^2}^*}\\
\end{array}\]