Initial program 42.8
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}
\]
Simplified42.8
\[\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_binary6442.8
\[\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_binary6442.8
\[\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_binary6442.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)}}}
\]
Simplified42.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)}}
\]
Simplified28.0
\[\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 c around -inf 11.5
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(-\left(a + \frac{d \cdot b}{c}\right)\right)}
\]
Simplified7.0
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(-\mathsf{fma}\left(\frac{d}{c}, b, a\right)\right)}
\]
Initial program 17.1
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}
\]
Simplified17.1
\[\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_binary6417.1
\[\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_binary6417.1
\[\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_binary6417.1
\[\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)}}}
\]
Simplified17.1
\[\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)}}
\]
Simplified11.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)}}
\]
Applied add-sqr-sqrt_binary6412.0
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \frac{\mathsf{fma}\left(d, b, c \cdot a\right)}{\color{blue}{\sqrt{\mathsf{hypot}\left(d, c\right)} \cdot \sqrt{\mathsf{hypot}\left(d, c\right)}}}
\]
Applied *-un-lft-identity_binary6412.0
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \frac{\color{blue}{1 \cdot \mathsf{fma}\left(d, b, c \cdot a\right)}}{\sqrt{\mathsf{hypot}\left(d, c\right)} \cdot \sqrt{\mathsf{hypot}\left(d, c\right)}}
\]
Applied times-frac_binary6412.0
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(\frac{1}{\sqrt{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(d, b, c \cdot a\right)}{\sqrt{\mathsf{hypot}\left(d, c\right)}}\right)}
\]
Applied associate-*r*_binary6414.0
\[\leadsto \color{blue}{\left(\frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \frac{1}{\sqrt{\mathsf{hypot}\left(d, c\right)}}\right) \cdot \frac{\mathsf{fma}\left(d, b, c \cdot a\right)}{\sqrt{\mathsf{hypot}\left(d, c\right)}}}
\]
Simplified14.0
\[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{\mathsf{hypot}\left(d, c\right)}}}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(d, b, c \cdot a\right)}{\sqrt{\mathsf{hypot}\left(d, c\right)}}
\]
Taylor expanded in b around 0 17.1
\[\leadsto \color{blue}{\frac{d \cdot b}{{d}^{2} + {c}^{2}} + \frac{c \cdot a}{{d}^{2} + {c}^{2}}}
\]
Simplified14.4
\[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{\mathsf{fma}\left(c, c, d \cdot d\right)}, a, \frac{d \cdot b}{\mathsf{fma}\left(c, c, d \cdot d\right)}\right)}
\]
Applied add-sqr-sqrt_binary6414.4
\[\leadsto \mathsf{fma}\left(\frac{c}{\mathsf{fma}\left(c, c, d \cdot d\right)}, a, \frac{d \cdot b}{\color{blue}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)} \cdot \sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}\right)
\]
Applied times-frac_binary6413.2
\[\leadsto \mathsf{fma}\left(\frac{c}{\mathsf{fma}\left(c, c, d \cdot d\right)}, a, \color{blue}{\frac{d}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}} \cdot \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}}\right)
\]
Simplified13.2
\[\leadsto \mathsf{fma}\left(\frac{c}{\mathsf{fma}\left(c, c, d \cdot d\right)}, a, \color{blue}{\frac{d}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{b}{\sqrt{\mathsf{fma}\left(c, c, d \cdot d\right)}}\right)
\]
Simplified4.5
\[\leadsto \mathsf{fma}\left(\frac{c}{\mathsf{fma}\left(c, c, d \cdot d\right)}, a, \frac{d}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{b}{\mathsf{hypot}\left(d, c\right)}}\right)
\]
Initial program 24.4
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}
\]
Simplified24.4
\[\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_binary6424.4
\[\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_binary6424.4
\[\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_binary6424.4
\[\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)}}}
\]
Simplified24.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(c, c, d \cdot d\right)}}
\]
Simplified12.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 10.0
\[\leadsto \color{blue}{\frac{b}{d} + \frac{c \cdot a}{{d}^{2}}}
\]
Simplified7.4
\[\leadsto \color{blue}{\mathsf{fma}\left(\frac{a}{d}, \frac{c}{d}, \frac{b}{d}\right)}
\]
Initial program 42.7
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}
\]
Simplified42.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_binary6442.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_binary6442.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_binary6442.7
\[\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)}}}
\]
Simplified42.7
\[\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 0 13.1
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(a + \frac{d \cdot b}{c}\right)}
\]
Simplified9.3
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\mathsf{fma}\left(\frac{d}{c}, b, a\right)}
\]