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(c, c, d \cdot d\right)}}
\]
Applied add-sqr-sqrt_binary6441.2
\[\leadsto \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}
\]
Applied *-un-lft-identity_binary6441.2
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(a, c, b \cdot d\right)}}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\]
Applied times-frac_binary6441.2
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\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(c, c, d \cdot d\right)}}
\]
Simplified27.3
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(d, b, c \cdot a\right)}{\mathsf{hypot}\left(d, c\right)}}
\]
Taylor expanded in d around -inf 12.6
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(-\left(\frac{c \cdot a}{d} + b\right)\right)}
\]
Simplified8.0
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(-\mathsf{fma}\left(\frac{c}{d}, a, b\right)\right)}
\]
Initial program 18.7
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}
\]
Simplified18.7
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\]
Applied add-sqr-sqrt_binary6418.7
\[\leadsto \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}
\]
Applied *-un-lft-identity_binary6418.7
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(a, c, b \cdot d\right)}}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\]
Applied times-frac_binary6418.8
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}
\]
Simplified18.8
\[\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(c, c, d \cdot d\right)}}
\]
Simplified12.1
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(d, b, c \cdot a\right)}{\mathsf{hypot}\left(d, c\right)}}
\]
Taylor expanded in b around 0 18.7
\[\leadsto \color{blue}{\frac{d \cdot b}{{d}^{2} + {c}^{2}} + \frac{c \cdot a}{{d}^{2} + {c}^{2}}}
\]
Simplified16.6
\[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{\mathsf{fma}\left(d, d, c \cdot c\right)}, a, \frac{d \cdot b}{\mathsf{fma}\left(d, d, c \cdot c\right)}\right)}
\]
Applied add-sqr-sqrt_binary6416.6
\[\leadsto \mathsf{fma}\left(\frac{c}{\color{blue}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}, a, \frac{d \cdot b}{\mathsf{fma}\left(d, d, c \cdot c\right)}\right)
\]
Applied *-un-lft-identity_binary6416.6
\[\leadsto \mathsf{fma}\left(\frac{\color{blue}{1 \cdot c}}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}, a, \frac{d \cdot b}{\mathsf{fma}\left(d, d, c \cdot c\right)}\right)
\]
Applied times-frac_binary6416.6
\[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}} \cdot \frac{c}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}, a, \frac{d \cdot b}{\mathsf{fma}\left(d, d, c \cdot c\right)}\right)
\]
Simplified16.6
\[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\mathsf{hypot}\left(c, d\right)}} \cdot \frac{c}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}, a, \frac{d \cdot b}{\mathsf{fma}\left(d, d, c \cdot c\right)}\right)
\]
Simplified6.9
\[\leadsto \mathsf{fma}\left(\frac{1}{\mathsf{hypot}\left(c, d\right)} \cdot \color{blue}{\frac{c}{\mathsf{hypot}\left(c, d\right)}}, a, \frac{d \cdot b}{\mathsf{fma}\left(d, d, c \cdot c\right)}\right)
\]
Initial program 44.6
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}
\]
Simplified44.6
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\]
Applied add-sqr-sqrt_binary6444.6
\[\leadsto \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}
\]
Applied *-un-lft-identity_binary6444.6
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(a, c, b \cdot d\right)}}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}
\]
Applied times-frac_binary6444.6
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}} \cdot \frac{\mathsf{fma}\left(a, c, b \cdot d\right)}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}
\]
Simplified44.6
\[\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(c, c, d \cdot d\right)}}
\]
Simplified28.8
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{\mathsf{fma}\left(d, b, c \cdot a\right)}{\mathsf{hypot}\left(d, c\right)}}
\]
Taylor expanded in d around inf 14.7
\[\leadsto \color{blue}{\frac{b}{d} + \frac{c \cdot a}{{d}^{2}}}
\]
Simplified7.5
\[\leadsto \color{blue}{\mathsf{fma}\left(\frac{a}{d}, \frac{c}{d}, \frac{b}{d}\right)}
\]