- Split input into 3 regimes
if c < -1.2534913427767432e+147
Initial program 44.1
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt44.1
\[\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-identity44.1
\[\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-frac44.1
\[\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}}}\]
Simplified44.1
\[\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}}\]
Simplified27.9
\[\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-*l/27.9
\[\leadsto \color{blue}{\frac{1 \cdot \frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}{\sqrt{c^2 + d^2}^*}}\]
Simplified27.9
\[\leadsto \frac{\color{blue}{\frac{(d \cdot b + \left(c \cdot a\right))_*}{\sqrt{c^2 + d^2}^*}}}{\sqrt{c^2 + d^2}^*}\]
- Using strategy
rm Applied clear-num27.9
\[\leadsto \frac{\color{blue}{\frac{1}{\frac{\sqrt{c^2 + d^2}^*}{(d \cdot b + \left(c \cdot a\right))_*}}}}{\sqrt{c^2 + d^2}^*}\]
Taylor expanded around -inf 13.1
\[\leadsto \frac{\color{blue}{-1 \cdot a}}{\sqrt{c^2 + d^2}^*}\]
Simplified13.1
\[\leadsto \frac{\color{blue}{-a}}{\sqrt{c^2 + d^2}^*}\]
if -1.2534913427767432e+147 < c < 2.135523821820183e+102
Initial program 19.0
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt19.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-identity19.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-frac19.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}}}\]
Simplified19.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}}\]
Simplified11.9
\[\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-*l/11.8
\[\leadsto \color{blue}{\frac{1 \cdot \frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}{\sqrt{c^2 + d^2}^*}}\]
Simplified11.8
\[\leadsto \frac{\color{blue}{\frac{(d \cdot b + \left(c \cdot a\right))_*}{\sqrt{c^2 + d^2}^*}}}{\sqrt{c^2 + d^2}^*}\]
- Using strategy
rm Applied clear-num11.9
\[\leadsto \frac{\color{blue}{\frac{1}{\frac{\sqrt{c^2 + d^2}^*}{(d \cdot b + \left(c \cdot a\right))_*}}}}{\sqrt{c^2 + d^2}^*}\]
if 2.135523821820183e+102 < c
Initial program 39.8
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt39.8
\[\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-identity39.8
\[\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-frac39.8
\[\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}}}\]
Simplified39.8
\[\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.0
\[\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-*l/26.0
\[\leadsto \color{blue}{\frac{1 \cdot \frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{c^2 + d^2}^*}}{\sqrt{c^2 + d^2}^*}}\]
Simplified26.0
\[\leadsto \frac{\color{blue}{\frac{(d \cdot b + \left(c \cdot a\right))_*}{\sqrt{c^2 + d^2}^*}}}{\sqrt{c^2 + d^2}^*}\]
Taylor expanded around 0 16.6
\[\leadsto \frac{\color{blue}{a}}{\sqrt{c^2 + d^2}^*}\]
- Recombined 3 regimes into one program.
Final simplification13.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;c \le -1.2534913427767432 \cdot 10^{+147}:\\
\;\;\;\;\frac{-a}{\sqrt{c^2 + d^2}^*}\\
\mathbf{elif}\;c \le 2.135523821820183 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{1}{\frac{\sqrt{c^2 + d^2}^*}{(d \cdot b + \left(a \cdot c\right))_*}}}{\sqrt{c^2 + d^2}^*}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\sqrt{c^2 + d^2}^*}\\
\end{array}\]