- Split input into 3 regimes
if y < -1.2032223167563086e-42 or -2.0118099058943753e-159 < y < -4.1330897435654156e-178
Initial program 27.7
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
Simplified27.7
\[\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 2.3
\[\leadsto \color{blue}{-1}\]
if -1.2032223167563086e-42 < y < -2.0118099058943753e-159 or 1.5107001695998868e-176 < y
Initial program 1.7
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
Simplified1.7
\[\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 associate-/l*2.1
\[\leadsto \color{blue}{\frac{x - y}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{y + x}}}\]
if -4.1330897435654156e-178 < y < 1.5107001695998868e-176
Initial program 30.1
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
Simplified30.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 associate-/l*30.5
\[\leadsto \color{blue}{\frac{x - y}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{y + x}}}\]
Taylor expanded around inf 14.8
\[\leadsto \color{blue}{1}\]
- Recombined 3 regimes into one program.
Final simplification5.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;y \le -1.2032223167563086 \cdot 10^{-42}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \le -2.0118099058943753 \cdot 10^{-159}:\\
\;\;\;\;\frac{x - y}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{y + x}}\\
\mathbf{elif}\;y \le -4.1330897435654156 \cdot 10^{-178}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \le 1.5107001695998868 \cdot 10^{-176}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\frac{(x \cdot x + \left(y \cdot y\right))_*}{y + x}}\\
\end{array}\]