- Split input into 3 regimes
if y < -1.3621929750686734e+154
Initial program 63.6
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
- Using strategy
rm Applied *-un-lft-identity63.6
\[\leadsto \frac{\left(x - y\right) \cdot \left(x + y\right)}{\color{blue}{1 \cdot \left(x \cdot x + y \cdot y\right)}}\]
Applied times-frac62.0
\[\leadsto \color{blue}{\frac{x - y}{1} \cdot \frac{x + y}{x \cdot x + y \cdot y}}\]
Simplified62.0
\[\leadsto \color{blue}{\left(x - y\right)} \cdot \frac{x + y}{x \cdot x + y \cdot y}\]
Taylor expanded around 0 0
\[\leadsto \color{blue}{-1}\]
if -1.3621929750686734e+154 < y < -6.939519951113058e-158 or 6.367181491385553e-165 < y
Initial program 0.2
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
- Using strategy
rm Applied add-log-exp0.2
\[\leadsto \color{blue}{\log \left(e^{\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}}\right)}\]
if -6.939519951113058e-158 < y < 6.367181491385553e-165
Initial program 29.2
\[\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\]
- Using strategy
rm Applied *-un-lft-identity29.2
\[\leadsto \frac{\left(x - y\right) \cdot \left(x + y\right)}{\color{blue}{1 \cdot \left(x \cdot x + y \cdot y\right)}}\]
Applied times-frac30.0
\[\leadsto \color{blue}{\frac{x - y}{1} \cdot \frac{x + y}{x \cdot x + y \cdot y}}\]
Simplified30.0
\[\leadsto \color{blue}{\left(x - y\right)} \cdot \frac{x + y}{x \cdot x + y \cdot y}\]
Taylor expanded around inf 15.6
\[\leadsto \color{blue}{1}\]
- Recombined 3 regimes into one program.
Final simplification5.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;y \le -1.3621929750686734 \cdot 10^{+154}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \le -6.939519951113058 \cdot 10^{-158}:\\
\;\;\;\;\log \left(e^{\frac{\left(x - y\right) \cdot \left(y + x\right)}{y \cdot y + x \cdot x}}\right)\\
\mathbf{elif}\;y \le 6.367181491385553 \cdot 10^{-165}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{\left(x - y\right) \cdot \left(y + x\right)}{y \cdot y + x \cdot x}}\right)\\
\end{array}\]