- Split input into 2 regimes
if y.im < -5.379472257971529e+59 or 2.383322591881426e+126 < y.im
Initial program 37.5
\[\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 div-sub37.5
\[\leadsto \color{blue}{\frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}}\]
- Using strategy
rm Applied associate-/l*35.0
\[\leadsto \frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \color{blue}{\frac{x.re}{\frac{y.re \cdot y.re + y.im \cdot y.im}{y.im}}}\]
if -5.379472257971529e+59 < y.im < 2.383322591881426e+126
Initial program 18.0
\[\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 div-sub18.1
\[\leadsto \color{blue}{\frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}}\]
- Using strategy
rm Applied add-sqr-sqrt18.1
\[\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{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Applied times-frac15.9
\[\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{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
- Recombined 2 regimes into one program.
Final simplification22.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.im \le -5.379472257971529 \cdot 10^{+59} \lor \neg \left(y.im \le 2.383322591881426 \cdot 10^{+126}\right):\\
\;\;\;\;\frac{x.im \cdot y.re}{y.im \cdot y.im + y.re \cdot y.re} - \frac{x.re}{\frac{y.im \cdot y.im + y.re \cdot y.re}{y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}} \cdot \frac{x.im}{\sqrt{y.im \cdot y.im + y.re \cdot y.re}} - \frac{y.im \cdot x.re}{y.im \cdot y.im + y.re \cdot y.re}\\
\end{array}\]