Initial program 41.6
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified41.6
\[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied clear-num41.6
\[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}{x.im \cdot y.re - x.re \cdot y.im}}}\]
- Using strategy
rm Applied *-un-lft-identity41.6
\[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}}\]
Applied add-sqr-sqrt41.6
\[\leadsto \frac{1}{\frac{\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)}}}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}\]
Applied times-frac41.6
\[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1} \cdot \frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}}\]
Applied add-cube-cbrt41.6
\[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1} \cdot \frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}\]
Applied times-frac41.6
\[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}}\]
Simplified41.6
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}\]
Simplified29.9
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{y.re \cdot x.im - y.im \cdot x.re}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Taylor expanded around -inf 10.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\left(-1 \cdot x.im\right)}\]
Simplified10.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\left(-x.im\right)}\]
Initial program 22.3
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified22.3
\[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied clear-num22.4
\[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}{x.im \cdot y.re - x.re \cdot y.im}}}\]
- Using strategy
rm Applied *-un-lft-identity22.4
\[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}}\]
Applied add-sqr-sqrt22.4
\[\leadsto \frac{1}{\frac{\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)}}}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}\]
Applied times-frac22.4
\[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1} \cdot \frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}}\]
Applied add-cube-cbrt22.4
\[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1} \cdot \frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}\]
Applied times-frac22.3
\[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}}\]
Simplified22.3
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}\]
Simplified14.0
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{y.re \cdot x.im - y.im \cdot x.re}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
- Using strategy
rm Applied associate-*r/14.0
\[\leadsto \color{blue}{\frac{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \left(y.re \cdot x.im - y.im \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Simplified13.9
\[\leadsto \frac{\color{blue}{\frac{y.re \cdot x.im - y.im \cdot x.re}{\mathsf{hypot}\left(y.im, y.re\right)}}}{\mathsf{hypot}\left(y.im, y.re\right)}\]
Initial program 42.1
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Simplified42.1
\[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\]
- Using strategy
rm Applied clear-num42.1
\[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}{x.im \cdot y.re - x.re \cdot y.im}}}\]
- Using strategy
rm Applied *-un-lft-identity42.1
\[\leadsto \frac{1}{\frac{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}}\]
Applied add-sqr-sqrt42.1
\[\leadsto \frac{1}{\frac{\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)}}}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}\]
Applied times-frac42.1
\[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1} \cdot \frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}}\]
Applied add-cube-cbrt42.1
\[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1} \cdot \frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}\]
Applied times-frac42.1
\[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{1}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}}\]
Simplified42.1
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}{x.im \cdot y.re - x.re \cdot y.im}}\]
Simplified29.5
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{y.re \cdot x.im - y.im \cdot x.re}{\mathsf{hypot}\left(y.im, y.re\right)}}\]
Taylor expanded around inf 12.1
\[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{x.im}\]