- Split input into 3 regimes
if c < -3.978558295461232e+235
Initial program 41.3
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt41.3
\[\leadsto \frac{b \cdot c - a \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied *-un-lft-identity41.3
\[\leadsto \frac{\color{blue}{1 \cdot \left(b \cdot c - a \cdot d\right)}}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac41.3
\[\leadsto \color{blue}{\frac{1}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified41.3
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}\]
Simplified32.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \color{blue}{\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}}\]
- Using strategy
rm Applied pow132.4
\[\leadsto \frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \color{blue}{{\left(\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}}\]
Applied pow132.4
\[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1}\right)}^{1}} \cdot {\left(\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\]
Applied pow-prod-down32.4
\[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}}\]
Simplified32.3
\[\leadsto {\color{blue}{\left(\frac{\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}}{\mathsf{hypot}\left(c, d\right)}\right)}}^{1}\]
Taylor expanded around -inf 9.8
\[\leadsto {\left(\frac{\color{blue}{-1 \cdot b}}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\]
if -3.978558295461232e+235 < c < 7.268592019881047e+91
Initial program 21.8
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt21.8
\[\leadsto \frac{b \cdot c - a \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied *-un-lft-identity21.8
\[\leadsto \frac{\color{blue}{1 \cdot \left(b \cdot c - a \cdot d\right)}}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac21.8
\[\leadsto \color{blue}{\frac{1}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified21.8
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}\]
Simplified13.1
\[\leadsto \frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \color{blue}{\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}}\]
- Using strategy
rm Applied pow113.1
\[\leadsto \frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \color{blue}{{\left(\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}}\]
Applied pow113.1
\[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1}\right)}^{1}} \cdot {\left(\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\]
Applied pow-prod-down13.1
\[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}}\]
Simplified13.0
\[\leadsto {\color{blue}{\left(\frac{\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}}{\mathsf{hypot}\left(c, d\right)}\right)}}^{1}\]
if 7.268592019881047e+91 < c
Initial program 39.6
\[\frac{b \cdot c - a \cdot d}{c \cdot c + d \cdot d}\]
- Using strategy
rm Applied add-sqr-sqrt39.6
\[\leadsto \frac{b \cdot c - a \cdot d}{\color{blue}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}}\]
Applied *-un-lft-identity39.6
\[\leadsto \frac{\color{blue}{1 \cdot \left(b \cdot c - a \cdot d\right)}}{\sqrt{c \cdot c + d \cdot d} \cdot \sqrt{c \cdot c + d \cdot d}}\]
Applied times-frac39.6
\[\leadsto \color{blue}{\frac{1}{\sqrt{c \cdot c + d \cdot d}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}}\]
Simplified39.6
\[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1}} \cdot \frac{b \cdot c - a \cdot d}{\sqrt{c \cdot c + d \cdot d}}\]
Simplified26.7
\[\leadsto \frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \color{blue}{\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}}\]
- Using strategy
rm Applied pow126.7
\[\leadsto \frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \color{blue}{{\left(\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}}\]
Applied pow126.7
\[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1}\right)}^{1}} \cdot {\left(\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\]
Applied pow-prod-down26.7
\[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(c, d\right) \cdot 1} \cdot \frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}}\]
Simplified26.6
\[\leadsto {\color{blue}{\left(\frac{\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}}{\mathsf{hypot}\left(c, d\right)}\right)}}^{1}\]
Taylor expanded around inf 16.6
\[\leadsto {\left(\frac{\color{blue}{b}}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\]
- Recombined 3 regimes into one program.
Final simplification13.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;c \le -3.9785582954612318 \cdot 10^{235}:\\
\;\;\;\;{\left(\frac{-1 \cdot b}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\\
\mathbf{elif}\;c \le 7.26859201988104701 \cdot 10^{91}:\\
\;\;\;\;{\left(\frac{\frac{b \cdot c - a \cdot d}{\mathsf{hypot}\left(c, d\right)}}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{b}{\mathsf{hypot}\left(c, d\right)}\right)}^{1}\\
\end{array}\]