Initial program 40.4
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified40.4
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt40.4
\[\leadsto \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied *-un-lft-identity40.4
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac40.4
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \cdot \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Simplified40.4
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Simplified27.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
- Using strategy
rm Applied *-un-lft-identity27.4
\[\leadsto \color{blue}{\left(1 \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)} \cdot \frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Applied associate-*l*27.4
\[\leadsto \color{blue}{1 \cdot \left(\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}\right)}\]
Simplified27.3
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(y.im, -x.re, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Taylor expanded around -inf 17.0
\[\leadsto 1 \cdot \frac{\color{blue}{x.re}}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Initial program 18.8
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified18.8
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt18.8
\[\leadsto \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied *-un-lft-identity18.8
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac18.8
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \cdot \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Simplified18.8
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Simplified11.7
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
- Using strategy
rm Applied *-un-lft-identity11.7
\[\leadsto \color{blue}{\left(1 \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)} \cdot \frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Applied associate-*l*11.7
\[\leadsto \color{blue}{1 \cdot \left(\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}\right)}\]
Simplified11.6
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(y.im, -x.re, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Initial program 40.4
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified40.4
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt40.4
\[\leadsto \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied *-un-lft-identity40.4
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac40.4
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \cdot \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Simplified40.4
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\mathsf{fma}\left(-y.im, x.re, x.im \cdot y.re\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Simplified26.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
- Using strategy
rm Applied *-un-lft-identity26.4
\[\leadsto \color{blue}{\left(1 \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)} \cdot \frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Applied associate-*l*26.4
\[\leadsto \color{blue}{1 \cdot \left(\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{\mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}\right)}\]
Simplified26.4
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(y.im, -x.re, y.re \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Taylor expanded around inf 15.2
\[\leadsto 1 \cdot \frac{\color{blue}{-1 \cdot x.re}}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Simplified15.2
\[\leadsto 1 \cdot \frac{\color{blue}{-x.re}}{\mathsf{hypot}\left(y.im, y.re\right)}\]