- Split input into 3 regimes
if c < -3.2478826001159976e+79
Initial program 38.7
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt38.7
\[\leadsto \frac{a \cdot c + b \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied *-un-lft-identity38.7
\[\leadsto \frac{\color{blue}{1 \cdot \left(a \cdot c + b \cdot d\right)}}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac38.7
\[\leadsto \color{blue}{\frac{1}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified38.7
\[\leadsto \color{blue}{\frac{1}{\sqrt{c^2 + d^2}^*}} \cdot \frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}\]
Simplified26.3
\[\leadsto \frac{1}{\sqrt{c^2 + d^2}^*} \cdot \color{blue}{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}\]
- Using strategy
rm Applied associate-*r/26.3
\[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{c^2 + d^2}^*} \cdot (a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}\]
Taylor expanded around -inf 18.2
\[\leadsto \frac{\color{blue}{-1 \cdot a}}{\sqrt{c^2 + d^2}^*}\]
Simplified18.2
\[\leadsto \frac{\color{blue}{-a}}{\sqrt{c^2 + d^2}^*}\]
if -3.2478826001159976e+79 < c < 4.2926249805720697e+213
Initial program 21.0
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt21.0
\[\leadsto \frac{a \cdot c + b \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied *-un-lft-identity21.0
\[\leadsto \frac{\color{blue}{1 \cdot \left(a \cdot c + b \cdot d\right)}}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac21.0
\[\leadsto \color{blue}{\frac{1}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified21.0
\[\leadsto \color{blue}{\frac{1}{\sqrt{c^2 + d^2}^*}} \cdot \frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}\]
Simplified12.5
\[\leadsto \frac{1}{\sqrt{c^2 + d^2}^*} \cdot \color{blue}{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}\]
- Using strategy
rm Applied associate-*r/12.5
\[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{c^2 + d^2}^*} \cdot (a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}\]
if 4.2926249805720697e+213 < c
Initial program 41.0
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt41.0
\[\leadsto \frac{a \cdot c + b \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied *-un-lft-identity41.0
\[\leadsto \frac{\color{blue}{1 \cdot \left(a \cdot c + b \cdot d\right)}}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac41.0
\[\leadsto \color{blue}{\frac{1}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified41.0
\[\leadsto \color{blue}{\frac{1}{\sqrt{c^2 + d^2}^*}} \cdot \frac{a \cdot c + b \cdot d}{\sqrt{c \cdot c + d \cdot d}}\]
Simplified29.5
\[\leadsto \frac{1}{\sqrt{c^2 + d^2}^*} \cdot \color{blue}{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}\]
- Using strategy
rm Applied associate-*r/29.5
\[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{c^2 + d^2}^*} \cdot (a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}\]
Taylor expanded around inf 10.0
\[\leadsto \frac{\color{blue}{a}}{\sqrt{c^2 + d^2}^*}\]
- Recombined 3 regimes into one program.
Final simplification13.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;c \le -3.2478826001159976 \cdot 10^{+79}:\\
\;\;\;\;\frac{-a}{\sqrt{c^2 + d^2}^*}\\
\mathbf{elif}\;c \le 4.2926249805720697 \cdot 10^{+213}:\\
\;\;\;\;\frac{(a \cdot c + \left(b \cdot d\right))_* \cdot \frac{1}{\sqrt{c^2 + d^2}^*}}{\sqrt{c^2 + d^2}^*}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\sqrt{c^2 + d^2}^*}\\
\end{array}\]