- Split input into 2 regimes
if y.im < -1.1702457669974666e+36 or 1.93993632877172e+28 < y.im
Initial program 33.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 div-sub33.8
\[\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*30.6
\[\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 -1.1702457669974666e+36 < y.im < 1.93993632877172e+28
Initial program 18.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-sub18.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 *-un-lft-identity18.5
\[\leadsto \frac{x.im \cdot y.re}{\color{blue}{1 \cdot \left(y.re \cdot y.re + y.im \cdot y.im\right)}} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Applied times-frac16.0
\[\leadsto \color{blue}{\frac{x.im}{1} \cdot \frac{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}\]
Simplified16.0
\[\leadsto \color{blue}{x.im} \cdot \frac{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}\]
- Recombined 2 regimes into one program.
Final simplification22.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;y.im \le -1.1702457669974666 \cdot 10^{+36} \lor \neg \left(y.im \le 1.93993632877172 \cdot 10^{+28}\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}:\\
\;\;\;\;x.im \cdot \frac{y.re}{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}\]