- Split input into 2 regimes
if y.im < -1.1259973219141482e-75 or 8.790420369344199e-151 < y.im
Initial program 27.1
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
- Using strategy
rm Applied add-sqr-sqrt27.1
\[\leadsto \frac{x.im \cdot y.re - x.re \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 associate-/r*27.1
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
- Using strategy
rm Applied div-sub27.1
\[\leadsto \frac{\color{blue}{\frac{x.im \cdot y.re}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} - \frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Applied div-sub27.1
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.re}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
Simplified27.1
\[\leadsto \color{blue}{\frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im}} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
- Using strategy
rm Applied *-un-lft-identity27.1
\[\leadsto \frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \frac{\frac{x.re \cdot y.im}{\sqrt{\color{blue}{1 \cdot \left(y.re \cdot y.re + y.im \cdot y.im\right)}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Applied sqrt-prod27.1
\[\leadsto \frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \frac{\frac{x.re \cdot y.im}{\color{blue}{\sqrt{1} \cdot \sqrt{y.re \cdot y.re + y.im \cdot y.im}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Applied times-frac24.9
\[\leadsto \frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \frac{\color{blue}{\frac{x.re}{\sqrt{1}} \cdot \frac{y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Simplified24.9
\[\leadsto \frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \frac{\color{blue}{x.re} \cdot \frac{y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
if -1.1259973219141482e-75 < y.im < 8.790420369344199e-151
Initial program 22.4
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
- Using strategy
rm Applied add-sqr-sqrt22.4
\[\leadsto \frac{x.im \cdot y.re - x.re \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 associate-/r*22.3
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
- Using strategy
rm Applied div-sub22.4
\[\leadsto \frac{\color{blue}{\frac{x.im \cdot y.re}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} - \frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Applied div-sub22.4
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.re}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
Simplified22.5
\[\leadsto \color{blue}{\frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im}} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
- Using strategy
rm Applied add-sqr-sqrt22.5
\[\leadsto \frac{x.im \cdot y.re}{\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}}} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Applied times-frac19.8
\[\leadsto \color{blue}{\frac{x.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{y.re}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}} - \frac{\frac{x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
- Recombined 2 regimes into one program.
Final simplification23.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.im \le -1.1259973219141482 \cdot 10^{-75} \lor \neg \left(y.im \le 8.790420369344199 \cdot 10^{-151}\right):\\
\;\;\;\;\frac{x.im \cdot y.re}{y.im \cdot y.im + y.re \cdot y.re} - \frac{\frac{y.im}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}} \cdot x.re}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}} \cdot \frac{y.re}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}} - \frac{\frac{y.im \cdot x.re}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}}}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}}\\
\end{array}\]