- Split input into 3 regimes
if c < -5.741069729192738e+171
Initial program 44.4
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified44.4
\[\leadsto \color{blue}{\frac{(a \cdot c + \left(b \cdot d\right))_*}{(d \cdot d + \left(c \cdot c\right))_*}}\]
- Using strategy
rm Applied add-sqr-sqrt44.4
\[\leadsto \frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*} \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Applied associate-/r*44.4
\[\leadsto \color{blue}{\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
- Using strategy
rm Applied *-un-lft-identity44.4
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\color{blue}{1 \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Applied *-un-lft-identity44.4
\[\leadsto \frac{\color{blue}{1 \cdot \frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}}{1 \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Applied times-frac44.4
\[\leadsto \color{blue}{\frac{1}{1} \cdot \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Simplified44.4
\[\leadsto \color{blue}{1} \cdot \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Simplified29.5
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{d^2 + c^2}^*}}\]
Taylor expanded around -inf 12.9
\[\leadsto 1 \cdot \frac{\color{blue}{-1 \cdot a}}{\sqrt{d^2 + c^2}^*}\]
Simplified12.9
\[\leadsto 1 \cdot \frac{\color{blue}{-a}}{\sqrt{d^2 + c^2}^*}\]
if -5.741069729192738e+171 < c < 6.539484508112857e+120
Initial program 19.1
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified19.1
\[\leadsto \color{blue}{\frac{(a \cdot c + \left(b \cdot d\right))_*}{(d \cdot d + \left(c \cdot c\right))_*}}\]
- Using strategy
rm Applied add-sqr-sqrt19.1
\[\leadsto \frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*} \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Applied associate-/r*19.0
\[\leadsto \color{blue}{\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
- Using strategy
rm Applied *-un-lft-identity19.0
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\color{blue}{1 \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Applied *-un-lft-identity19.0
\[\leadsto \frac{\color{blue}{1 \cdot \frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}}{1 \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Applied times-frac19.0
\[\leadsto \color{blue}{\frac{1}{1} \cdot \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Simplified19.0
\[\leadsto \color{blue}{1} \cdot \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Simplified12.0
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{d^2 + c^2}^*}}\]
- Using strategy
rm Applied *-un-lft-identity12.0
\[\leadsto 1 \cdot \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\color{blue}{1 \cdot \sqrt{d^2 + c^2}^*}}\]
Applied associate-/r*12.0
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{1}}{\sqrt{d^2 + c^2}^*}}\]
if 6.539484508112857e+120 < c
Initial program 43.2
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified43.2
\[\leadsto \color{blue}{\frac{(a \cdot c + \left(b \cdot d\right))_*}{(d \cdot d + \left(c \cdot c\right))_*}}\]
- Using strategy
rm Applied add-sqr-sqrt43.2
\[\leadsto \frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*} \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Applied associate-/r*43.2
\[\leadsto \color{blue}{\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
- Using strategy
rm Applied *-un-lft-identity43.2
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\color{blue}{1 \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Applied *-un-lft-identity43.2
\[\leadsto \frac{\color{blue}{1 \cdot \frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}}{1 \cdot \sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Applied times-frac43.2
\[\leadsto \color{blue}{\frac{1}{1} \cdot \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}\]
Simplified43.2
\[\leadsto \color{blue}{1} \cdot \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Simplified27.6
\[\leadsto 1 \cdot \color{blue}{\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{d^2 + c^2}^*}}\]
Taylor expanded around inf 14.8
\[\leadsto 1 \cdot \frac{\color{blue}{a}}{\sqrt{d^2 + c^2}^*}\]
- Recombined 3 regimes into one program.
Final simplification12.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;c \le -5.741069729192738 \cdot 10^{+171}:\\
\;\;\;\;\frac{-a}{\sqrt{d^2 + c^2}^*}\\
\mathbf{elif}\;c \le 6.539484508112857 \cdot 10^{+120}:\\
\;\;\;\;\frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{d^2 + c^2}^*}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\sqrt{d^2 + c^2}^*}\\
\end{array}\]