Initial program 41.2
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified41.2
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt41.2
\[\leadsto \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}\]
Applied *-un-lft-identity41.2
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(a, c, b \cdot d\right)}}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Applied times-frac41.2
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}\]
Simplified41.2
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Simplified27.8
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}}\]
- Using strategy
rm Applied *-un-lft-identity27.8
\[\leadsto \frac{1}{\color{blue}{1 \cdot \mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied add-sqr-sqrt27.8
\[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot \mathsf{hypot}\left(d, c\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied times-frac27.8
\[\leadsto \color{blue}{\left(\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{\mathsf{hypot}\left(d, c\right)}\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied associate-*l*27.8
\[\leadsto \color{blue}{\frac{\sqrt{1}}{1} \cdot \left(\frac{\sqrt{1}}{\mathsf{hypot}\left(d, c\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\right)}\]
Simplified27.7
\[\leadsto \frac{\sqrt{1}}{1} \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}}{\mathsf{hypot}\left(d, c\right)}}\]
Taylor expanded around -inf 14.5
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\color{blue}{-1 \cdot a}}{\mathsf{hypot}\left(d, c\right)}\]
Simplified14.5
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\color{blue}{-a}}{\mathsf{hypot}\left(d, c\right)}\]
Initial program 21.4
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified21.4
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt21.4
\[\leadsto \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}\]
Applied *-un-lft-identity21.4
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(a, c, b \cdot d\right)}}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Applied times-frac21.5
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}\]
Simplified21.4
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Simplified13.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}}\]
- Using strategy
rm Applied *-un-lft-identity13.4
\[\leadsto \frac{1}{\color{blue}{1 \cdot \mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied add-sqr-sqrt13.4
\[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot \mathsf{hypot}\left(d, c\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied times-frac13.4
\[\leadsto \color{blue}{\left(\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{\mathsf{hypot}\left(d, c\right)}\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied associate-*l*13.4
\[\leadsto \color{blue}{\frac{\sqrt{1}}{1} \cdot \left(\frac{\sqrt{1}}{\mathsf{hypot}\left(d, c\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\right)}\]
Simplified13.3
\[\leadsto \frac{\sqrt{1}}{1} \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}}{\mathsf{hypot}\left(d, c\right)}}\]
Initial program 43.0
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified43.0
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt43.0
\[\leadsto \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}\]
Applied *-un-lft-identity43.0
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(a, c, b \cdot d\right)}}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Applied times-frac43.0
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}\]
Simplified43.0
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Simplified30.3
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}}\]
- Using strategy
rm Applied *-un-lft-identity30.3
\[\leadsto \frac{1}{\color{blue}{1 \cdot \mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied add-sqr-sqrt30.3
\[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot \mathsf{hypot}\left(d, c\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied times-frac30.3
\[\leadsto \color{blue}{\left(\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{\mathsf{hypot}\left(d, c\right)}\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\]
Applied associate-*l*30.3
\[\leadsto \color{blue}{\frac{\sqrt{1}}{1} \cdot \left(\frac{\sqrt{1}}{\mathsf{hypot}\left(d, c\right)} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}\right)}\]
Simplified30.3
\[\leadsto \frac{\sqrt{1}}{1} \cdot \color{blue}{\frac{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{hypot}\left(d, c\right)}}{\mathsf{hypot}\left(d, c\right)}}\]
Taylor expanded around inf 12.5
\[\leadsto \frac{\sqrt{1}}{1} \cdot \frac{\color{blue}{a}}{\mathsf{hypot}\left(d, c\right)}\]