- Split input into 3 regimes
if c < -2.519475376326208e+165
Initial program 42.9
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified42.9
\[\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-sqrt42.9
\[\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*42.9
\[\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 fma-udef42.9
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}\]
Applied hypot-def42.9
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\color{blue}{\sqrt{d^2 + c^2}^*}}\]
- Using strategy
rm Applied fma-udef42.9
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}}{\sqrt{d^2 + c^2}^*}\]
Applied hypot-def27.3
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{d^2 + c^2}^*}}}{\sqrt{d^2 + c^2}^*}\]
Taylor expanded around -inf 12.2
\[\leadsto \frac{\color{blue}{-1 \cdot a}}{\sqrt{d^2 + c^2}^*}\]
Simplified12.2
\[\leadsto \frac{\color{blue}{-a}}{\sqrt{d^2 + c^2}^*}\]
if -2.519475376326208e+165 < c < 1.1071365722430642e+161
Initial program 20.0
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified20.0
\[\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-sqrt20.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*20.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 fma-udef20.0
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}\]
Applied hypot-def20.0
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\color{blue}{\sqrt{d^2 + c^2}^*}}\]
- Using strategy
rm Applied fma-udef20.0
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}}{\sqrt{d^2 + c^2}^*}\]
Applied hypot-def12.6
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{d^2 + c^2}^*}}}{\sqrt{d^2 + c^2}^*}\]
if 1.1071365722430642e+161 < c
Initial program 44.0
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified44.0
\[\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.0
\[\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.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 fma-udef44.0
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}\]
Applied hypot-def44.0
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}}{\color{blue}{\sqrt{d^2 + c^2}^*}}\]
Taylor expanded around inf 13.2
\[\leadsto \frac{\color{blue}{a}}{\sqrt{d^2 + c^2}^*}\]
- Recombined 3 regimes into one program.
Final simplification12.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;c \le -2.519475376326208 \cdot 10^{+165}:\\
\;\;\;\;\frac{-a}{\sqrt{d^2 + c^2}^*}\\
\mathbf{elif}\;c \le 1.1071365722430642 \cdot 10^{+161}:\\
\;\;\;\;\frac{\frac{(a \cdot c + \left(d \cdot b\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{d^2 + c^2}^*}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\sqrt{d^2 + c^2}^*}\\
\end{array}\]