Initial program 41.2
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified41.2
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt41.2
\[\leadsto \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\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 associate-/r*41.1
\[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
- Using strategy
rm Applied *-un-lft-identity41.1
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\color{blue}{1 \cdot \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied sqrt-prod41.1
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied *-un-lft-identity41.1
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\color{blue}{1 \cdot \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied sqrt-prod41.1
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied *-un-lft-identity41.1
\[\leadsto \frac{\frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac41.1
\[\leadsto \frac{\color{blue}{\frac{1}{\sqrt{1}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac41.1
\[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{1}}}{\sqrt{1}} \cdot \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Simplified41.1
\[\leadsto \color{blue}{1} \cdot \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Simplified27.7
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(y.re, x.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Taylor expanded around -inf 14.5
\[\leadsto 1 \cdot \frac{\color{blue}{-1 \cdot x.re}}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Simplified14.5
\[\leadsto 1 \cdot \frac{\color{blue}{-x.re}}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Initial program 21.4
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified21.4
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt21.4
\[\leadsto \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\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 associate-/r*21.4
\[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
- Using strategy
rm Applied *-un-lft-identity21.4
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\color{blue}{1 \cdot \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied sqrt-prod21.4
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied *-un-lft-identity21.4
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\color{blue}{1 \cdot \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied sqrt-prod21.4
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied *-un-lft-identity21.4
\[\leadsto \frac{\frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac21.4
\[\leadsto \frac{\color{blue}{\frac{1}{\sqrt{1}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac21.4
\[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{1}}}{\sqrt{1}} \cdot \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Simplified21.4
\[\leadsto \color{blue}{1} \cdot \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Simplified13.3
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(y.re, x.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Initial program 43.0
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified43.0
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt43.0
\[\leadsto \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\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 associate-/r*43.0
\[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
- Using strategy
rm Applied *-un-lft-identity43.0
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\color{blue}{1 \cdot \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied sqrt-prod43.0
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Applied *-un-lft-identity43.0
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\color{blue}{1 \cdot \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied sqrt-prod43.0
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied *-un-lft-identity43.0
\[\leadsto \frac{\frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac43.0
\[\leadsto \frac{\color{blue}{\frac{1}{\sqrt{1}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Applied times-frac43.0
\[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{1}}}{\sqrt{1}} \cdot \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}\]
Simplified43.0
\[\leadsto \color{blue}{1} \cdot \frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
Simplified30.3
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(y.re, x.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Taylor expanded around inf 12.5
\[\leadsto 1 \cdot \frac{\color{blue}{x.re}}{\mathsf{hypot}\left(y.im, y.re\right)}\]