Initial program 26.1
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified26.1
\[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt26.1
\[\leadsto \frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}}\]
Applied *-un-lft-identity26.1
\[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}\]
Applied times-frac26.1
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}}\]
Simplified26.1
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}\]
Simplified17.1
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}\]
- Using strategy
rm Applied *-un-lft-identity17.1
\[\leadsto \frac{1}{\color{blue}{1 \cdot \mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Applied add-sqr-sqrt17.1
\[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot \mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Applied times-frac17.1
\[\leadsto \color{blue}{\left(\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Applied associate-*l*17.1
\[\leadsto \color{blue}{\frac{\sqrt{1}}{1} \cdot \left(\frac{\sqrt{1}}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right)}\]
Simplified17.0
\[\leadsto \frac{\sqrt{1}}{1} \cdot \color{blue}{\frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}}\]
- Using strategy
rm Applied div-sub17.0
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\color{blue}{\frac{x.im \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Simplified17.0
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\color{blue}{\frac{y.re \cdot x.im}{\mathsf{hypot}\left(y.re, y.im\right)}} - \frac{x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Simplified9.7
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\frac{y.re \cdot x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - \color{blue}{y.im \cdot \frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}}{\mathsf{hypot}\left(y.re, y.im\right)}\]
- Using strategy
rm Applied *-un-lft-identity9.7
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\frac{y.re \cdot x.im}{\color{blue}{1 \cdot \mathsf{hypot}\left(y.re, y.im\right)}} - y.im \cdot \frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Applied times-frac1.2
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\color{blue}{\frac{y.re}{1} \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}} - y.im \cdot \frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Applied fma-neg1.2
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{y.re}{1}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, -y.im \cdot \frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Simplified1.2
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\mathsf{fma}\left(\frac{y.re}{1}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, \color{blue}{-\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot y.im}\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\]
Final simplification1.2
\[\leadsto \frac{\mathsf{fma}\left(y.re, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, -\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\]