- Split input into 3 regimes
if y.re < -1.5029763737270653e+132
Initial program 43.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-sqrt43.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 *-un-lft-identity43.4
\[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \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-frac43.4
\[\leadsto \color{blue}{\frac{1}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
Simplified43.4
\[\leadsto \color{blue}{\frac{1}{\sqrt{y.re^2 + y.im^2}^*}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Simplified27.1
\[\leadsto \frac{1}{\sqrt{y.re^2 + y.im^2}^*} \cdot \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}\]
- Using strategy
rm Applied associate-*l/27.1
\[\leadsto \color{blue}{\frac{1 \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}{\sqrt{y.re^2 + y.im^2}^*}}\]
Simplified27.1
\[\leadsto \frac{\color{blue}{\frac{y.re \cdot x.im - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}}{\sqrt{y.re^2 + y.im^2}^*}\]
- Using strategy
rm Applied *-un-lft-identity27.1
\[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(y.re \cdot x.im - x.re \cdot y.im\right)}}{\sqrt{y.re^2 + y.im^2}^*}}{\sqrt{y.re^2 + y.im^2}^*}\]
Applied associate-/l*27.1
\[\leadsto \frac{\color{blue}{\frac{1}{\frac{\sqrt{y.re^2 + y.im^2}^*}{y.re \cdot x.im - x.re \cdot y.im}}}}{\sqrt{y.re^2 + y.im^2}^*}\]
Taylor expanded around -inf 14.8
\[\leadsto \frac{\color{blue}{-1 \cdot x.im}}{\sqrt{y.re^2 + y.im^2}^*}\]
Simplified14.8
\[\leadsto \frac{\color{blue}{-x.im}}{\sqrt{y.re^2 + y.im^2}^*}\]
if -1.5029763737270653e+132 < y.re < 7.754041465511007e+123
Initial program 18.7
\[\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-sqrt18.7
\[\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 *-un-lft-identity18.7
\[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \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-frac18.7
\[\leadsto \color{blue}{\frac{1}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
Simplified18.7
\[\leadsto \color{blue}{\frac{1}{\sqrt{y.re^2 + y.im^2}^*}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Simplified11.7
\[\leadsto \frac{1}{\sqrt{y.re^2 + y.im^2}^*} \cdot \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}\]
- Using strategy
rm Applied associate-*l/11.6
\[\leadsto \color{blue}{\frac{1 \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}{\sqrt{y.re^2 + y.im^2}^*}}\]
Simplified11.6
\[\leadsto \frac{\color{blue}{\frac{y.re \cdot x.im - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}}{\sqrt{y.re^2 + y.im^2}^*}\]
- Using strategy
rm Applied *-un-lft-identity11.6
\[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(y.re \cdot x.im - x.re \cdot y.im\right)}}{\sqrt{y.re^2 + y.im^2}^*}}{\sqrt{y.re^2 + y.im^2}^*}\]
Applied associate-/l*11.6
\[\leadsto \frac{\color{blue}{\frac{1}{\frac{\sqrt{y.re^2 + y.im^2}^*}{y.re \cdot x.im - x.re \cdot y.im}}}}{\sqrt{y.re^2 + y.im^2}^*}\]
if 7.754041465511007e+123 < y.re
Initial program 40.8
\[\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-sqrt40.8
\[\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 *-un-lft-identity40.8
\[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \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-frac40.8
\[\leadsto \color{blue}{\frac{1}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}\]
Simplified40.8
\[\leadsto \color{blue}{\frac{1}{\sqrt{y.re^2 + y.im^2}^*}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Simplified26.9
\[\leadsto \frac{1}{\sqrt{y.re^2 + y.im^2}^*} \cdot \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}\]
- Using strategy
rm Applied associate-*l/26.8
\[\leadsto \color{blue}{\frac{1 \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}{\sqrt{y.re^2 + y.im^2}^*}}\]
Simplified26.8
\[\leadsto \frac{\color{blue}{\frac{y.re \cdot x.im - x.re \cdot y.im}{\sqrt{y.re^2 + y.im^2}^*}}}{\sqrt{y.re^2 + y.im^2}^*}\]
Taylor expanded around inf 16.3
\[\leadsto \frac{\color{blue}{x.im}}{\sqrt{y.re^2 + y.im^2}^*}\]
- Recombined 3 regimes into one program.
Final simplification12.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.re \le -1.5029763737270653 \cdot 10^{+132}:\\
\;\;\;\;\frac{-x.im}{\sqrt{y.re^2 + y.im^2}^*}\\
\mathbf{elif}\;y.re \le 7.754041465511007 \cdot 10^{+123}:\\
\;\;\;\;\frac{\frac{1}{\frac{\sqrt{y.re^2 + y.im^2}^*}{x.im \cdot y.re - x.re \cdot y.im}}}{\sqrt{y.re^2 + y.im^2}^*}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\sqrt{y.re^2 + y.im^2}^*}\\
\end{array}\]