- Split input into 2 regimes
if y.re < -1.507317256257123e+121
Initial program 41.2
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Initial simplification41.2
\[\leadsto \frac{x.im \cdot y.im + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im}\]
- Using strategy
rm Applied add-sqr-sqrt41.2
\[\leadsto \frac{x.im \cdot y.im + x.re \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}}}\]
Applied associate-/r*41.2
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.im + x.re \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}}}\]
- Using strategy
rm Applied clear-num41.2
\[\leadsto \frac{\color{blue}{\frac{1}{\frac{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}{x.im \cdot y.im + x.re \cdot y.re}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Taylor expanded around -inf 39.9
\[\leadsto \frac{\color{blue}{-1 \cdot x.re}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Simplified39.9
\[\leadsto \frac{\color{blue}{-x.re}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
if -1.507317256257123e+121 < y.re
Initial program 23.5
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Initial simplification23.5
\[\leadsto \frac{x.im \cdot y.im + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im}\]
- Using strategy
rm Applied add-sqr-sqrt23.5
\[\leadsto \frac{x.im \cdot y.im + x.re \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}}}\]
Applied associate-/r*23.4
\[\leadsto \color{blue}{\frac{\frac{x.im \cdot y.im + x.re \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}}}\]
- Using strategy
rm Applied clear-num23.5
\[\leadsto \frac{\color{blue}{\frac{1}{\frac{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}{x.im \cdot y.im + x.re \cdot y.re}}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
- Recombined 2 regimes into one program.
Final simplification26.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.re \le -1.507317256257123 \cdot 10^{+121}:\\
\;\;\;\;\frac{-x.re}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}{x.im \cdot y.im + x.re \cdot y.re}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\end{array}\]