- Split input into 2 regimes
if d < -1.1702457669974666e+36 or 1.93993632877172e+28 < d
Initial program 33.8
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied div-sub33.8
\[\leadsto \color{blue}{\frac{b \cdot c}{c \cdot c + d \cdot d} - \frac{a \cdot d}{c \cdot c + d \cdot d}}\]
- Using strategy
rm Applied associate-/l*30.6
\[\leadsto \frac{b \cdot c}{c \cdot c + d \cdot d} - \color{blue}{\frac{a}{\frac{c \cdot c + d \cdot d}{d}}}\]
if -1.1702457669974666e+36 < d < 1.93993632877172e+28
Initial program 18.5
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied div-sub18.5
\[\leadsto \color{blue}{\frac{b \cdot c}{c \cdot c + d \cdot d} - \frac{a \cdot d}{c \cdot c + d \cdot d}}\]
- Using strategy
rm Applied *-un-lft-identity18.5
\[\leadsto \frac{b \cdot c}{\color{blue}{1 \cdot \left(c \cdot c + d \cdot d\right)}} - \frac{a \cdot d}{c \cdot c + d \cdot d}\]
Applied times-frac16.0
\[\leadsto \color{blue}{\frac{b}{1} \cdot \frac{c}{c \cdot c + d \cdot d}} - \frac{a \cdot d}{c \cdot c + d \cdot d}\]
Simplified16.0
\[\leadsto \color{blue}{b} \cdot \frac{c}{c \cdot c + d \cdot d} - \frac{a \cdot d}{c \cdot c + d \cdot d}\]
- Recombined 2 regimes into one program.
Final simplification22.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;d \le -1.1702457669974666 \cdot 10^{+36} \lor \neg \left(d \le 1.93993632877172 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{b \cdot c}{d \cdot d + c \cdot c} - \frac{a}{\frac{d \cdot d + c \cdot c}{d}}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{c}{d \cdot d + c \cdot c} - \frac{d \cdot a}{d \cdot d + c \cdot c}\\
\end{array}\]