- Split input into 3 regimes
if y < -1.3333303064172979e+154
Initial program 63.6
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
Simplified63.6
\[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot \left(y + x\right)}{(x \cdot x + \left(y \cdot y\right))_*}}\]
Taylor expanded around 0 0
\[\leadsto \color{blue}{-1}\]
if -1.3333303064172979e+154 < y < -1.732224639472966e-162 or 1.200250758898154e-160 < y
Initial program 0.1
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
Simplified0.1
\[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot \left(y + x\right)}{(x \cdot x + \left(y \cdot y\right))_*}}\]
- Using strategy
rm Applied clear-num0.1
\[\leadsto \color{blue}{\frac{1}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{\left(x - y\right) \cdot \left(y + x\right)}}}\]
if -1.732224639472966e-162 < y < 1.200250758898154e-160
Initial program 29.1
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
Simplified29.1
\[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot \left(y + x\right)}{(x \cdot x + \left(y \cdot y\right))_*}}\]
- Using strategy
rm Applied clear-num29.1
\[\leadsto \color{blue}{\frac{1}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{\left(x - y\right) \cdot \left(y + x\right)}}}\]
Taylor expanded around inf 17.0
\[\leadsto \color{blue}{1}\]
- Recombined 3 regimes into one program.
Final simplification5.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;y \le -1.3333303064172979 \cdot 10^{+154}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \le -1.732224639472966 \cdot 10^{-162}:\\
\;\;\;\;\frac{1}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{\left(x - y\right) \cdot \left(y + x\right)}}\\
\mathbf{elif}\;y \le 1.200250758898154 \cdot 10^{-160}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{\left(x - y\right) \cdot \left(y + x\right)}}\\
\end{array}\]