Initial program 25.6
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
Simplified25.6
\[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-d, a, b \cdot c\right)}{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
- Using strategy
rm Applied add-sqr-sqrt25.6
\[\leadsto \frac{\mathsf{fma}\left(-d, a, b \cdot c\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-identity25.6
\[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(-d, a, b \cdot c\right)}}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)} \cdot \sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Applied times-frac25.7
\[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}} \cdot \frac{\mathsf{fma}\left(-d, a, b \cdot c\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}}\]
Simplified25.7
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(d, c\right)}} \cdot \frac{\mathsf{fma}\left(-d, a, b \cdot c\right)}{\sqrt{\mathsf{fma}\left(d, d, c \cdot c\right)}}\]
Simplified16.6
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\frac{b \cdot c - d \cdot a}{\mathsf{hypot}\left(d, c\right)}}\]
- Using strategy
rm Applied div-sub16.6
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(\frac{b \cdot c}{\mathsf{hypot}\left(d, c\right)} - \frac{d \cdot a}{\mathsf{hypot}\left(d, c\right)}\right)}\]
Simplified9.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\frac{b \cdot c}{\mathsf{hypot}\left(d, c\right)} - \color{blue}{\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}}\right)\]
- Using strategy
rm Applied *-un-lft-identity9.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\frac{b \cdot c}{\mathsf{hypot}\left(d, c\right)} - \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{\color{blue}{1 \cdot d}}}\right)\]
Applied *-un-lft-identity9.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\frac{b \cdot c}{\mathsf{hypot}\left(d, c\right)} - \frac{a}{\frac{\color{blue}{1 \cdot \mathsf{hypot}\left(d, c\right)}}{1 \cdot d}}\right)\]
Applied times-frac9.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\frac{b \cdot c}{\mathsf{hypot}\left(d, c\right)} - \frac{a}{\color{blue}{\frac{1}{1} \cdot \frac{\mathsf{hypot}\left(d, c\right)}{d}}}\right)\]
Applied *-un-lft-identity9.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\frac{b \cdot c}{\mathsf{hypot}\left(d, c\right)} - \frac{\color{blue}{1 \cdot a}}{\frac{1}{1} \cdot \frac{\mathsf{hypot}\left(d, c\right)}{d}}\right)\]
Applied times-frac9.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\frac{b \cdot c}{\mathsf{hypot}\left(d, c\right)} - \color{blue}{\frac{1}{\frac{1}{1}} \cdot \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}}\right)\]
Applied *-un-lft-identity9.2
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\frac{b \cdot c}{\color{blue}{1 \cdot \mathsf{hypot}\left(d, c\right)}} - \frac{1}{\frac{1}{1}} \cdot \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}\right)\]
Applied times-frac0.6
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \left(\color{blue}{\frac{b}{1} \cdot \frac{c}{\mathsf{hypot}\left(d, c\right)}} - \frac{1}{\frac{1}{1}} \cdot \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}\right)\]
Applied prod-diff0.6
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \color{blue}{\left(\mathsf{fma}\left(\frac{b}{1}, \frac{c}{\mathsf{hypot}\left(d, c\right)}, -\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}} \cdot \frac{1}{\frac{1}{1}}\right) + \mathsf{fma}\left(-\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}, \frac{1}{\frac{1}{1}}, \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}} \cdot \frac{1}{\frac{1}{1}}\right)\right)}\]
Applied distribute-lft-in0.6
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \mathsf{fma}\left(\frac{b}{1}, \frac{c}{\mathsf{hypot}\left(d, c\right)}, -\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}} \cdot \frac{1}{\frac{1}{1}}\right) + \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \mathsf{fma}\left(-\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}, \frac{1}{\frac{1}{1}}, \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}} \cdot \frac{1}{\frac{1}{1}}\right)}\]
Simplified0.4
\[\leadsto \color{blue}{\frac{1 \cdot \mathsf{fma}\left(b, \frac{c}{\mathsf{hypot}\left(d, c\right)}, \frac{-a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}\right)}{\mathsf{hypot}\left(d, c\right)}} + \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \mathsf{fma}\left(-\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}, \frac{1}{\frac{1}{1}}, \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}} \cdot \frac{1}{\frac{1}{1}}\right)\]
Simplified0.4
\[\leadsto \frac{1 \cdot \mathsf{fma}\left(b, \frac{c}{\mathsf{hypot}\left(d, c\right)}, \frac{-a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}\right)}{\mathsf{hypot}\left(d, c\right)} + \color{blue}{\frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \mathsf{fma}\left(\frac{-a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}, 1, \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}\right)}\]
Final simplification0.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(d, c\right)} \cdot \mathsf{fma}\left(-\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}, 1, \frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}\right) + \frac{\mathsf{fma}\left(b, \frac{c}{\mathsf{hypot}\left(d, c\right)}, -\frac{a}{\frac{\mathsf{hypot}\left(d, c\right)}{d}}\right)}{\mathsf{hypot}\left(d, c\right)}\]