- Split input into 3 regimes
if c < -2.5199309894899704e+102
Initial program 38.7
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified38.7
\[\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-sqrt38.7
\[\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*38.6
\[\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-udef38.6
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Applied hypot-def38.6
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{d^2 + c^2}^*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
- Using strategy
rm Applied fma-udef38.6
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}\]
Applied hypot-def25.1
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\color{blue}{\sqrt{d^2 + c^2}^*}}\]
Taylor expanded around -inf 16.5
\[\leadsto \frac{\color{blue}{-1 \cdot a}}{\sqrt{d^2 + c^2}^*}\]
Simplified16.5
\[\leadsto \frac{\color{blue}{-a}}{\sqrt{d^2 + c^2}^*}\]
if -2.5199309894899704e+102 < c < 1.8011763110697258e+137
Initial program 18.5
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified18.5
\[\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-sqrt18.5
\[\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*18.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 fma-udef18.4
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Applied hypot-def18.4
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{d^2 + c^2}^*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
- Using strategy
rm Applied fma-udef18.4
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}\]
Applied hypot-def11.5
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\color{blue}{\sqrt{d^2 + c^2}^*}}\]
if 1.8011763110697258e+137 < c
Initial program 42.3
\[\frac{a \cdot c + b \cdot d}{c \cdot c + d \cdot d}\]
Simplified42.3
\[\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.3
\[\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.3
\[\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.3
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
Applied hypot-def42.3
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\color{blue}{\sqrt{d^2 + c^2}^*}}}{\sqrt{(d \cdot d + \left(c \cdot c\right))_*}}\]
- Using strategy
rm Applied fma-udef42.3
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\sqrt{\color{blue}{d \cdot d + c \cdot c}}}\]
Applied hypot-def27.5
\[\leadsto \frac{\frac{(a \cdot c + \left(b \cdot d\right))_*}{\sqrt{d^2 + c^2}^*}}{\color{blue}{\sqrt{d^2 + c^2}^*}}\]
Taylor expanded around inf 13.7
\[\leadsto \frac{\color{blue}{a}}{\sqrt{d^2 + c^2}^*}\]
- Recombined 3 regimes into one program.
Final simplification12.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;c \le -2.5199309894899704 \cdot 10^{+102}:\\
\;\;\;\;\frac{-a}{\sqrt{d^2 + c^2}^*}\\
\mathbf{elif}\;c \le 1.8011763110697258 \cdot 10^{+137}:\\
\;\;\;\;\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}\]