Initial program 26.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 add-sqr-sqrt26.0
\[\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-identity26.0
\[\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-frac26.0
\[\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}}}\]
Simplified26.0
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\]
Simplified16.8
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \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 div-sub16.8
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \color{blue}{\left(\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)}\right)}\]
- Using strategy
rm Applied add-sqr-sqrt16.8
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \left(\frac{x.im \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{x.re \cdot y.im}{\color{blue}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}}\right)\]
Applied times-frac9.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \left(\frac{x.im \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} - \color{blue}{\frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}}\right)\]
Applied add-sqr-sqrt9.5
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \left(\frac{x.im \cdot y.re}{\color{blue}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}} - \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)\]
Applied times-frac0.9
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \left(\color{blue}{\frac{x.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{y.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}} - \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)\]
Applied prod-diff0.9
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \color{blue}{\left(\mathsf{fma}\left(\frac{x.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, -\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right) + \mathsf{fma}\left(-\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)\right)}\]
Applied distribute-lft-in0.9
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \mathsf{fma}\left(\frac{x.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, -\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right) + \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \mathsf{fma}\left(-\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)}\]
Simplified0.8
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{x.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, -\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)}{\mathsf{hypot}\left(y.re, y.im\right)}} + \frac{1}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1} \cdot \mathsf{fma}\left(-\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)\]
Simplified0.8
\[\leadsto \frac{\mathsf{fma}\left(\frac{x.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, -\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)}{\mathsf{hypot}\left(y.re, y.im\right)} + \color{blue}{\left(\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \left(\left(-\frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right) + \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)\right) \cdot \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}}\]
Final simplification0.8
\[\leadsto \frac{\mathsf{fma}\left(\frac{x.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, \frac{y.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}, -\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)}{\mathsf{hypot}\left(y.re, y.im\right)} + \left(\frac{y.im}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}} \cdot \left(\left(-\frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right) + \frac{x.re}{\sqrt{\mathsf{hypot}\left(y.re, y.im\right)}}\right)\right) \cdot \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\]