- Split input into 2 regimes
if d < -1.1259973219141482e-75 or 8.790420369344199e-151 < d
Initial program 27.1
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
Initial simplification27.1
\[\leadsto \frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt27.1
\[\leadsto \frac{b \cdot c - a \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied associate-/r*27.1
\[\leadsto \color{blue}{\frac{\frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}}\]
- Using strategy
rm Applied div-sub27.1
\[\leadsto \frac{\color{blue}{\frac{b \cdot c}{\sqrt{c \cdot c + d \cdot d}} - \frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}}{\sqrt{c \cdot c + d \cdot d}}\]
Applied div-sub27.1
\[\leadsto \color{blue}{\frac{\frac{b \cdot c}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}} - \frac{\frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified27.1
\[\leadsto \color{blue}{\frac{b \cdot c}{c \cdot c + d \cdot d}} - \frac{\frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}\]
- Using strategy
rm Applied *-un-lft-identity27.1
\[\leadsto \frac{b \cdot c}{c \cdot c + d \cdot d} - \frac{\frac{a \cdot d}{\sqrt{\color{blue}{1 \cdot \left(c \cdot c + d \cdot d\right)}}}}{\sqrt{c \cdot c + d \cdot d}}\]
Applied sqrt-prod27.1
\[\leadsto \frac{b \cdot c}{c \cdot c + d \cdot d} - \frac{\frac{a \cdot d}{\color{blue}{\sqrt{1} \cdot \sqrt{c \cdot c + d \cdot d}}}}{\sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac24.9
\[\leadsto \frac{b \cdot c}{c \cdot c + d \cdot d} - \frac{\color{blue}{\frac{a}{\sqrt{1}} \cdot \frac{d}{\sqrt{c \cdot c + d \cdot d}}}}{\sqrt{c \cdot c + d \cdot d}}\]
Simplified24.9
\[\leadsto \frac{b \cdot c}{c \cdot c + d \cdot d} - \frac{\color{blue}{a} \cdot \frac{d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}\]
if -1.1259973219141482e-75 < d < 8.790420369344199e-151
Initial program 22.4
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
Initial simplification22.4
\[\leadsto \frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt22.4
\[\leadsto \frac{b \cdot c - a \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied associate-/r*22.3
\[\leadsto \color{blue}{\frac{\frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}}\]
- Using strategy
rm Applied div-sub22.4
\[\leadsto \frac{\color{blue}{\frac{b \cdot c}{\sqrt{c \cdot c + d \cdot d}} - \frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}}{\sqrt{c \cdot c + d \cdot d}}\]
Applied div-sub22.4
\[\leadsto \color{blue}{\frac{\frac{b \cdot c}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}} - \frac{\frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified22.5
\[\leadsto \color{blue}{\frac{b \cdot c}{c \cdot c + d \cdot d}} - \frac{\frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}\]
- Using strategy
rm Applied add-sqr-sqrt22.5
\[\leadsto \frac{b \cdot c}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}} - \frac{\frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac19.8
\[\leadsto \color{blue}{\frac{b}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{c}{\sqrt{c \cdot c + d \cdot d}}} - \frac{\frac{a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}{\sqrt{c \cdot c + d \cdot d}}\]
- Recombined 2 regimes into one program.
Final simplification23.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;d \le -1.1259973219141482 \cdot 10^{-75} \lor \neg \left(d \le 8.790420369344199 \cdot 10^{-151}\right):\\
\;\;\;\;\frac{b \cdot c}{d \cdot d + c \cdot c} - \frac{\frac{d}{\sqrt{d \cdot d + c \cdot c}} \cdot a}{\sqrt{d \cdot d + c \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{\sqrt{d \cdot d + c \cdot c}} \cdot \frac{c}{\sqrt{d \cdot d + c \cdot c}} - \frac{\frac{d \cdot a}{\sqrt{d \cdot d + c \cdot c}}}{\sqrt{d \cdot d + c \cdot c}}\\
\end{array}\]