Initial program 42.4
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\]
Simplified42.4
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Applied add-sqr-sqrt_binary6442.4
\[\leadsto \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\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-identity_binary6442.4
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, x.im \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-frac_binary6442.4
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}}
\]
Simplified42.4
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Simplified27.3
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Taylor expanded in y.im around inf 15.6
\[\leadsto \color{blue}{\frac{x.re \cdot y.re}{{y.im}^{2}} + \frac{x.im}{y.im}}
\]
Simplified7.1
\[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x.re}{y.im}, \frac{y.re}{y.im}, \frac{x.im}{y.im}\right)}
\]
Initial program 16.5
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\]
Simplified16.5
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Applied add-sqr-sqrt_binary6416.5
\[\leadsto \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\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-identity_binary6416.5
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, x.im \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-frac_binary6416.6
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}}
\]
Simplified16.6
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Simplified11.9
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Applied associate-*l/_binary6411.8
\[\leadsto \color{blue}{\frac{1 \cdot \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Simplified11.8
\[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}}{\mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied add-sqr-sqrt_binary6412.0
\[\leadsto \frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\color{blue}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}}{\mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied associate-/r*_binary6412.0
\[\leadsto \frac{\color{blue}{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}}{\mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied *-un-lft-identity_binary6412.0
\[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\color{blue}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}}
\]
Applied *-un-lft-identity_binary6412.0
\[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\color{blue}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}}}}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied sqrt-prod_binary6412.0
\[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied *-un-lft-identity_binary6412.0
\[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\color{blue}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied sqrt-prod_binary6412.0
\[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\color{blue}{\sqrt{1} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied *-un-lft-identity_binary6412.0
\[\leadsto \frac{\frac{\frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}}{\sqrt{1} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{1} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied times-frac_binary6412.0
\[\leadsto \frac{\frac{\color{blue}{\frac{1}{\sqrt{1}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}}{\sqrt{1} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied times-frac_binary6412.0
\[\leadsto \frac{\color{blue}{\frac{\frac{1}{\sqrt{1}}}{\sqrt{1}} \cdot \frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}}{1 \cdot \mathsf{hypot}\left(y.im, y.re\right)}
\]
Applied times-frac_binary6412.0
\[\leadsto \color{blue}{\frac{\frac{\frac{1}{\sqrt{1}}}{\sqrt{1}}}{1} \cdot \frac{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Simplified12.0
\[\leadsto \color{blue}{1} \cdot \frac{\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\mathsf{hypot}\left(y.im, y.re\right)}
\]
Simplified11.8
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Initial program 19.4
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\]
Simplified19.4
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Applied add-sqr-sqrt_binary6419.4
\[\leadsto \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\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-identity_binary6419.4
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, x.im \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-frac_binary6419.4
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}}
\]
Simplified19.4
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Simplified12.7
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Applied associate-*l/_binary6412.6
\[\leadsto \color{blue}{\frac{1 \cdot \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Simplified12.6
\[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}}{\mathsf{hypot}\left(y.im, y.re\right)}
\]
Initial program 41.0
\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\]
Simplified41.0
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Applied add-sqr-sqrt_binary6441.0
\[\leadsto \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\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-identity_binary6441.0
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(x.re, y.re, x.im \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-frac_binary6441.1
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}}
\]
Simplified41.1
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}
\]
Simplified26.9
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}
\]
Taylor expanded in y.im around inf 13.7
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\left(\frac{x.re \cdot y.re}{y.im} + x.im\right)}
\]
Simplified9.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\mathsf{fma}\left(\frac{x.re}{y.im}, y.re, x.im\right)}
\]