Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A

Percentage Accurate: 69.6% → 99.8%
Time: 19.5s
Alternatives: 20
Speedup: 1.4×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y):
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y)
	return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0)))
end
function tmp = code(x, y)
	tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 20 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 69.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y):
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y)
	return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0)))
end
function tmp = code(x, y)
	tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + \left(y + 1\right)} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (* (/ (/ y (+ y x)) (+ y x)) (/ x (+ x (+ y 1.0)))))
assert(x < y);
double code(double x, double y) {
	return ((y / (y + x)) / (y + x)) * (x / (x + (y + 1.0)));
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((y / (y + x)) / (y + x)) * (x / (x + (y + 1.0d0)))
end function
assert x < y;
public static double code(double x, double y) {
	return ((y / (y + x)) / (y + x)) * (x / (x + (y + 1.0)));
}
[x, y] = sort([x, y])
def code(x, y):
	return ((y / (y + x)) / (y + x)) * (x / (x + (y + 1.0)))
x, y = sort([x, y])
function code(x, y)
	return Float64(Float64(Float64(y / Float64(y + x)) / Float64(y + x)) * Float64(x / Float64(x + Float64(y + 1.0))))
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
	tmp = ((y / (y + x)) / (y + x)) * (x / (x + (y + 1.0)));
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + \left(y + 1\right)}
\end{array}
Derivation
  1. Initial program 68.3%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. associate-/r*74.0%

      \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
    2. *-commutative74.0%

      \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
    3. +-commutative74.0%

      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
    4. +-commutative74.0%

      \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
    5. associate-*l/89.3%

      \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
    6. +-commutative89.3%

      \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
    7. associate-*r/89.4%

      \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
    8. remove-double-neg89.4%

      \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
    9. +-commutative89.4%

      \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
    10. +-commutative89.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
    11. remove-double-neg89.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
    12. +-commutative89.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
    13. associate-+l+89.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified89.4%

    \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-/r*99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    2. div-inv99.7%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
  6. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
  7. Step-by-step derivation
    1. associate-*r/99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    2. *-rgt-identity99.7%

      \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
  8. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
  9. Final simplification99.7%

    \[\leadsto \frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + \left(y + 1\right)} \]
  10. Add Preprocessing

Alternative 2: 86.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{y + x}\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+164}:\\ \;\;\;\;\frac{t_0}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-63}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{t_0}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (+ y x))))
   (if (<= x -1.05e+164)
     (/ t_0 x)
     (if (<= x -1.85e+15)
       (/ y (* (+ y x) (+ y x)))
       (if (<= x -4.2e-24)
         (/ (/ y (+ x 1.0)) (+ y x))
         (if (<= x -5e-63)
           (/ 1.0 (* (+ y x) (/ (+ y 1.0) x)))
           (if (<= x -2.9e-184)
             (* x (/ t_0 (+ y x)))
             (/ (/ x (+ y (+ x 1.0))) (+ y (* x 2.0))))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -1.05e+164) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -4.2e-24) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -5e-63) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -2.9e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = y / (y + x)
    if (x <= (-1.05d+164)) then
        tmp = t_0 / x
    else if (x <= (-1.85d+15)) then
        tmp = y / ((y + x) * (y + x))
    else if (x <= (-4.2d-24)) then
        tmp = (y / (x + 1.0d0)) / (y + x)
    else if (x <= (-5d-63)) then
        tmp = 1.0d0 / ((y + x) * ((y + 1.0d0) / x))
    else if (x <= (-2.9d-184)) then
        tmp = x * (t_0 / (y + x))
    else
        tmp = (x / (y + (x + 1.0d0))) / (y + (x * 2.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -1.05e+164) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -4.2e-24) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -5e-63) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -2.9e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = y / (y + x)
	tmp = 0
	if x <= -1.05e+164:
		tmp = t_0 / x
	elif x <= -1.85e+15:
		tmp = y / ((y + x) * (y + x))
	elif x <= -4.2e-24:
		tmp = (y / (x + 1.0)) / (y + x)
	elif x <= -5e-63:
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x))
	elif x <= -2.9e-184:
		tmp = x * (t_0 / (y + x))
	else:
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(y / Float64(y + x))
	tmp = 0.0
	if (x <= -1.05e+164)
		tmp = Float64(t_0 / x);
	elseif (x <= -1.85e+15)
		tmp = Float64(y / Float64(Float64(y + x) * Float64(y + x)));
	elseif (x <= -4.2e-24)
		tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x));
	elseif (x <= -5e-63)
		tmp = Float64(1.0 / Float64(Float64(y + x) * Float64(Float64(y + 1.0) / x)));
	elseif (x <= -2.9e-184)
		tmp = Float64(x * Float64(t_0 / Float64(y + x)));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + Float64(x * 2.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = y / (y + x);
	tmp = 0.0;
	if (x <= -1.05e+164)
		tmp = t_0 / x;
	elseif (x <= -1.85e+15)
		tmp = y / ((y + x) * (y + x));
	elseif (x <= -4.2e-24)
		tmp = (y / (x + 1.0)) / (y + x);
	elseif (x <= -5e-63)
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	elseif (x <= -2.9e-184)
		tmp = x * (t_0 / (y + x));
	else
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+164], N[(t$95$0 / x), $MachinePrecision], If[LessEqual[x, -1.85e+15], N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-24], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5e-63], N[(1.0 / N[(N[(y + x), $MachinePrecision] * N[(N[(y + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e-184], N[(x * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+164}:\\
\;\;\;\;\frac{t_0}{x}\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{elif}\;x \leq -4.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\mathbf{elif}\;x \leq -5 \cdot 10^{-63}:\\
\;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\

\mathbf{elif}\;x \leq -2.9 \cdot 10^{-184}:\\
\;\;\;\;x \cdot \frac{t_0}{y + x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -1.04999999999999995e164

    1. Initial program 52.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative76.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac52.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in3.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/52.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef0.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult0.0%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times76.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num76.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.9%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 92.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x}} \]

    if -1.04999999999999995e164 < x < -1.85e15

    1. Initial program 62.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*85.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative85.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/97.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative97.0%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/97.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative97.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 75.2%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{1} \]

    if -1.85e15 < x < -4.1999999999999999e-24

    1. Initial program 99.4%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.3%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.3%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac99.4%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/99.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative99.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in86.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef87.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult86.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.2%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around 0 75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + x}} \]
    8. Step-by-step derivation
      1. +-commutative75.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    9. Simplified75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    10. Step-by-step derivation
      1. clear-num75.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{\frac{y}{x + y}}}} \]
      2. inv-pow75.2%

        \[\leadsto \color{blue}{{\left(\frac{x + 1}{\frac{y}{x + y}}\right)}^{-1}} \]
      3. div-inv75.4%

        \[\leadsto {\color{blue}{\left(\left(x + 1\right) \cdot \frac{1}{\frac{y}{x + y}}\right)}}^{-1} \]
      4. clear-num75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \color{blue}{\frac{x + y}{y}}\right)}^{-1} \]
      5. +-commutative75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \frac{\color{blue}{y + x}}{y}\right)}^{-1} \]
    11. Applied egg-rr75.4%

      \[\leadsto \color{blue}{{\left(\left(x + 1\right) \cdot \frac{y + x}{y}\right)}^{-1}} \]
    12. Step-by-step derivation
      1. unpow-175.4%

        \[\leadsto \color{blue}{\frac{1}{\left(x + 1\right) \cdot \frac{y + x}{y}}} \]
      2. associate-*r/75.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    13. Simplified75.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    14. Step-by-step derivation
      1. clear-num75.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + 1\right) \cdot \left(y + x\right)}} \]
      2. *-un-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{\left(x + 1\right) \cdot \left(y + x\right)} \]
      3. +-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\left(x + 1\right) \cdot \color{blue}{\left(x + y\right)}} \]
      4. *-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + 1\right)}} \]
      5. times-frac75.6%

        \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    15. Applied egg-rr75.6%

      \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    16. Step-by-step derivation
      1. associate-*l/75.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + 1}}{x + y}} \]
      2. *-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + 1}}}{x + y} \]
      3. +-commutative75.6%

        \[\leadsto \frac{\frac{y}{x + 1}}{\color{blue}{y + x}} \]
    17. Simplified75.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + 1}}{y + x}} \]

    if -4.1999999999999999e-24 < x < -5.0000000000000002e-63

    1. Initial program 76.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.6%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac76.8%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.8%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.8%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.8%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/76.8%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult76.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.3%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around inf 86.1%

      \[\leadsto \frac{\color{blue}{1}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \]
    8. Taylor expanded in x around 0 86.1%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + y}{x}} \cdot \left(x + y\right)} \]
    9. Step-by-step derivation
      1. +-commutative86.1%

        \[\leadsto \frac{1}{\frac{\color{blue}{y + 1}}{x} \cdot \left(x + y\right)} \]
    10. Simplified86.1%

      \[\leadsto \frac{1}{\color{blue}{\frac{y + 1}{x}} \cdot \left(x + y\right)} \]

    if -5.0000000000000002e-63 < x < -2.90000000000000014e-184

    1. Initial program 72.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.4%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.4%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.9%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.5%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 73.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{x} \]

    if -2.90000000000000014e-184 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac70.2%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/86.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative86.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in80.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified86.3%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef66.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult66.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times89.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num88.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/89.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity89.0%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow289.0%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr89.0%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 57.0%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y + 2 \cdot x}} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification66.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+164}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-63}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 86.4% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{y + x}\\ \mathbf{if}\;x \leq -9.4 \cdot 10^{+163}:\\ \;\;\;\;\frac{t_0}{\left(x + 1\right) + y \cdot 2}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -1.18 \cdot 10^{-63}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{t_0}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (+ y x))))
   (if (<= x -9.4e+163)
     (/ t_0 (+ (+ x 1.0) (* y 2.0)))
     (if (<= x -1.85e+15)
       (/ y (* (+ y x) (+ y x)))
       (if (<= x -4.7e-23)
         (/ (/ y (+ x 1.0)) (+ y x))
         (if (<= x -1.18e-63)
           (/ 1.0 (* (+ y x) (/ (+ y 1.0) x)))
           (if (<= x -3.2e-184)
             (* x (/ t_0 (+ y x)))
             (/ (/ x (+ y (+ x 1.0))) (+ y (* x 2.0))))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -9.4e+163) {
		tmp = t_0 / ((x + 1.0) + (y * 2.0));
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -4.7e-23) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -1.18e-63) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -3.2e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = y / (y + x)
    if (x <= (-9.4d+163)) then
        tmp = t_0 / ((x + 1.0d0) + (y * 2.0d0))
    else if (x <= (-1.85d+15)) then
        tmp = y / ((y + x) * (y + x))
    else if (x <= (-4.7d-23)) then
        tmp = (y / (x + 1.0d0)) / (y + x)
    else if (x <= (-1.18d-63)) then
        tmp = 1.0d0 / ((y + x) * ((y + 1.0d0) / x))
    else if (x <= (-3.2d-184)) then
        tmp = x * (t_0 / (y + x))
    else
        tmp = (x / (y + (x + 1.0d0))) / (y + (x * 2.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -9.4e+163) {
		tmp = t_0 / ((x + 1.0) + (y * 2.0));
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -4.7e-23) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -1.18e-63) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -3.2e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = y / (y + x)
	tmp = 0
	if x <= -9.4e+163:
		tmp = t_0 / ((x + 1.0) + (y * 2.0))
	elif x <= -1.85e+15:
		tmp = y / ((y + x) * (y + x))
	elif x <= -4.7e-23:
		tmp = (y / (x + 1.0)) / (y + x)
	elif x <= -1.18e-63:
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x))
	elif x <= -3.2e-184:
		tmp = x * (t_0 / (y + x))
	else:
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(y / Float64(y + x))
	tmp = 0.0
	if (x <= -9.4e+163)
		tmp = Float64(t_0 / Float64(Float64(x + 1.0) + Float64(y * 2.0)));
	elseif (x <= -1.85e+15)
		tmp = Float64(y / Float64(Float64(y + x) * Float64(y + x)));
	elseif (x <= -4.7e-23)
		tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x));
	elseif (x <= -1.18e-63)
		tmp = Float64(1.0 / Float64(Float64(y + x) * Float64(Float64(y + 1.0) / x)));
	elseif (x <= -3.2e-184)
		tmp = Float64(x * Float64(t_0 / Float64(y + x)));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + Float64(x * 2.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = y / (y + x);
	tmp = 0.0;
	if (x <= -9.4e+163)
		tmp = t_0 / ((x + 1.0) + (y * 2.0));
	elseif (x <= -1.85e+15)
		tmp = y / ((y + x) * (y + x));
	elseif (x <= -4.7e-23)
		tmp = (y / (x + 1.0)) / (y + x);
	elseif (x <= -1.18e-63)
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	elseif (x <= -3.2e-184)
		tmp = x * (t_0 / (y + x));
	else
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.4e+163], N[(t$95$0 / N[(N[(x + 1.0), $MachinePrecision] + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.85e+15], N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.7e-23], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.18e-63], N[(1.0 / N[(N[(y + x), $MachinePrecision] * N[(N[(y + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-184], N[(x * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -9.4 \cdot 10^{+163}:\\
\;\;\;\;\frac{t_0}{\left(x + 1\right) + y \cdot 2}\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{elif}\;x \leq -4.7 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\mathbf{elif}\;x \leq -1.18 \cdot 10^{-63}:\\
\;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-184}:\\
\;\;\;\;x \cdot \frac{t_0}{y + x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -9.40000000000000037e163

    1. Initial program 52.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative76.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac52.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in3.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/52.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef0.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult0.0%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times76.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num76.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.9%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 93.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + \left(x + 2 \cdot y\right)}} \]
    8. Step-by-step derivation
      1. associate-+r+93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(1 + x\right) + 2 \cdot y}} \]
      2. +-commutative93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + 1\right)} + 2 \cdot y} \]
      3. *-commutative93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\left(x + 1\right) + \color{blue}{y \cdot 2}} \]
    9. Simplified93.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + 1\right) + y \cdot 2}} \]

    if -9.40000000000000037e163 < x < -1.85e15

    1. Initial program 62.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*85.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative85.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/97.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative97.0%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/97.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative97.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 75.2%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{1} \]

    if -1.85e15 < x < -4.7000000000000001e-23

    1. Initial program 99.4%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.3%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.3%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac99.4%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/99.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative99.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in86.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef87.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult86.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.2%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around 0 75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + x}} \]
    8. Step-by-step derivation
      1. +-commutative75.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    9. Simplified75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    10. Step-by-step derivation
      1. clear-num75.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{\frac{y}{x + y}}}} \]
      2. inv-pow75.2%

        \[\leadsto \color{blue}{{\left(\frac{x + 1}{\frac{y}{x + y}}\right)}^{-1}} \]
      3. div-inv75.4%

        \[\leadsto {\color{blue}{\left(\left(x + 1\right) \cdot \frac{1}{\frac{y}{x + y}}\right)}}^{-1} \]
      4. clear-num75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \color{blue}{\frac{x + y}{y}}\right)}^{-1} \]
      5. +-commutative75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \frac{\color{blue}{y + x}}{y}\right)}^{-1} \]
    11. Applied egg-rr75.4%

      \[\leadsto \color{blue}{{\left(\left(x + 1\right) \cdot \frac{y + x}{y}\right)}^{-1}} \]
    12. Step-by-step derivation
      1. unpow-175.4%

        \[\leadsto \color{blue}{\frac{1}{\left(x + 1\right) \cdot \frac{y + x}{y}}} \]
      2. associate-*r/75.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    13. Simplified75.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    14. Step-by-step derivation
      1. clear-num75.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + 1\right) \cdot \left(y + x\right)}} \]
      2. *-un-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{\left(x + 1\right) \cdot \left(y + x\right)} \]
      3. +-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\left(x + 1\right) \cdot \color{blue}{\left(x + y\right)}} \]
      4. *-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + 1\right)}} \]
      5. times-frac75.6%

        \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    15. Applied egg-rr75.6%

      \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    16. Step-by-step derivation
      1. associate-*l/75.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + 1}}{x + y}} \]
      2. *-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + 1}}}{x + y} \]
      3. +-commutative75.6%

        \[\leadsto \frac{\frac{y}{x + 1}}{\color{blue}{y + x}} \]
    17. Simplified75.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + 1}}{y + x}} \]

    if -4.7000000000000001e-23 < x < -1.17999999999999999e-63

    1. Initial program 76.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.6%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac76.8%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.8%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.8%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.8%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/76.8%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult76.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.3%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around inf 86.1%

      \[\leadsto \frac{\color{blue}{1}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \]
    8. Taylor expanded in x around 0 86.1%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + y}{x}} \cdot \left(x + y\right)} \]
    9. Step-by-step derivation
      1. +-commutative86.1%

        \[\leadsto \frac{1}{\frac{\color{blue}{y + 1}}{x} \cdot \left(x + y\right)} \]
    10. Simplified86.1%

      \[\leadsto \frac{1}{\color{blue}{\frac{y + 1}{x}} \cdot \left(x + y\right)} \]

    if -1.17999999999999999e-63 < x < -3.2e-184

    1. Initial program 72.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.4%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.4%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.9%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.5%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 73.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{x} \]

    if -3.2e-184 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac70.2%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/86.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative86.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in80.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified86.3%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef66.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult66.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times89.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num88.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/89.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity89.0%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow289.0%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr89.0%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 57.0%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y + 2 \cdot x}} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification67.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.4 \cdot 10^{+163}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{\left(x + 1\right) + y \cdot 2}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -1.18 \cdot 10^{-63}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 86.1% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{y + x}\\ \mathbf{if}\;x \leq -2.9 \cdot 10^{+161}:\\ \;\;\;\;\frac{t_0}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{-62}:\\ \;\;\;\;\frac{1}{\left(y + 1\right) \cdot \frac{y}{x}}\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{t_0}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (+ y x))))
   (if (<= x -2.9e+161)
     (/ t_0 x)
     (if (<= x -1.85e+15)
       (/ y (* (+ y x) (+ y x)))
       (if (<= x -2.7e-22)
         (/ (/ y (+ x 1.0)) (+ y x))
         (if (<= x -5.4e-62)
           (/ 1.0 (* (+ y 1.0) (/ y x)))
           (if (<= x -4.4e-184)
             (* x (/ t_0 (+ y x)))
             (/ (/ x (+ y (+ x 1.0))) y))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -2.9e+161) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -2.7e-22) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -5.4e-62) {
		tmp = 1.0 / ((y + 1.0) * (y / x));
	} else if (x <= -4.4e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = y / (y + x)
    if (x <= (-2.9d+161)) then
        tmp = t_0 / x
    else if (x <= (-1.85d+15)) then
        tmp = y / ((y + x) * (y + x))
    else if (x <= (-2.7d-22)) then
        tmp = (y / (x + 1.0d0)) / (y + x)
    else if (x <= (-5.4d-62)) then
        tmp = 1.0d0 / ((y + 1.0d0) * (y / x))
    else if (x <= (-4.4d-184)) then
        tmp = x * (t_0 / (y + x))
    else
        tmp = (x / (y + (x + 1.0d0))) / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -2.9e+161) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -2.7e-22) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -5.4e-62) {
		tmp = 1.0 / ((y + 1.0) * (y / x));
	} else if (x <= -4.4e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = y / (y + x)
	tmp = 0
	if x <= -2.9e+161:
		tmp = t_0 / x
	elif x <= -1.85e+15:
		tmp = y / ((y + x) * (y + x))
	elif x <= -2.7e-22:
		tmp = (y / (x + 1.0)) / (y + x)
	elif x <= -5.4e-62:
		tmp = 1.0 / ((y + 1.0) * (y / x))
	elif x <= -4.4e-184:
		tmp = x * (t_0 / (y + x))
	else:
		tmp = (x / (y + (x + 1.0))) / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(y / Float64(y + x))
	tmp = 0.0
	if (x <= -2.9e+161)
		tmp = Float64(t_0 / x);
	elseif (x <= -1.85e+15)
		tmp = Float64(y / Float64(Float64(y + x) * Float64(y + x)));
	elseif (x <= -2.7e-22)
		tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x));
	elseif (x <= -5.4e-62)
		tmp = Float64(1.0 / Float64(Float64(y + 1.0) * Float64(y / x)));
	elseif (x <= -4.4e-184)
		tmp = Float64(x * Float64(t_0 / Float64(y + x)));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = y / (y + x);
	tmp = 0.0;
	if (x <= -2.9e+161)
		tmp = t_0 / x;
	elseif (x <= -1.85e+15)
		tmp = y / ((y + x) * (y + x));
	elseif (x <= -2.7e-22)
		tmp = (y / (x + 1.0)) / (y + x);
	elseif (x <= -5.4e-62)
		tmp = 1.0 / ((y + 1.0) * (y / x));
	elseif (x <= -4.4e-184)
		tmp = x * (t_0 / (y + x));
	else
		tmp = (x / (y + (x + 1.0))) / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.9e+161], N[(t$95$0 / x), $MachinePrecision], If[LessEqual[x, -1.85e+15], N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.7e-22], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.4e-62], N[(1.0 / N[(N[(y + 1.0), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.4e-184], N[(x * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{+161}:\\
\;\;\;\;\frac{t_0}{x}\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{elif}\;x \leq -2.7 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\mathbf{elif}\;x \leq -5.4 \cdot 10^{-62}:\\
\;\;\;\;\frac{1}{\left(y + 1\right) \cdot \frac{y}{x}}\\

\mathbf{elif}\;x \leq -4.4 \cdot 10^{-184}:\\
\;\;\;\;x \cdot \frac{t_0}{y + x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -2.90000000000000016e161

    1. Initial program 52.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative76.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac52.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in3.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/52.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef0.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult0.0%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times76.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num76.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.9%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 92.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x}} \]

    if -2.90000000000000016e161 < x < -1.85e15

    1. Initial program 62.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*85.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative85.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/97.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative97.0%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/97.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative97.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 75.2%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{1} \]

    if -1.85e15 < x < -2.7000000000000002e-22

    1. Initial program 99.4%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.3%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.3%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac99.4%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/99.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative99.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in86.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef87.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult86.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.2%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around 0 75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + x}} \]
    8. Step-by-step derivation
      1. +-commutative75.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    9. Simplified75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    10. Step-by-step derivation
      1. clear-num75.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{\frac{y}{x + y}}}} \]
      2. inv-pow75.2%

        \[\leadsto \color{blue}{{\left(\frac{x + 1}{\frac{y}{x + y}}\right)}^{-1}} \]
      3. div-inv75.4%

        \[\leadsto {\color{blue}{\left(\left(x + 1\right) \cdot \frac{1}{\frac{y}{x + y}}\right)}}^{-1} \]
      4. clear-num75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \color{blue}{\frac{x + y}{y}}\right)}^{-1} \]
      5. +-commutative75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \frac{\color{blue}{y + x}}{y}\right)}^{-1} \]
    11. Applied egg-rr75.4%

      \[\leadsto \color{blue}{{\left(\left(x + 1\right) \cdot \frac{y + x}{y}\right)}^{-1}} \]
    12. Step-by-step derivation
      1. unpow-175.4%

        \[\leadsto \color{blue}{\frac{1}{\left(x + 1\right) \cdot \frac{y + x}{y}}} \]
      2. associate-*r/75.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    13. Simplified75.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    14. Step-by-step derivation
      1. clear-num75.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + 1\right) \cdot \left(y + x\right)}} \]
      2. *-un-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{\left(x + 1\right) \cdot \left(y + x\right)} \]
      3. +-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\left(x + 1\right) \cdot \color{blue}{\left(x + y\right)}} \]
      4. *-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + 1\right)}} \]
      5. times-frac75.6%

        \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    15. Applied egg-rr75.6%

      \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    16. Step-by-step derivation
      1. associate-*l/75.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + 1}}{x + y}} \]
      2. *-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + 1}}}{x + y} \]
      3. +-commutative75.6%

        \[\leadsto \frac{\frac{y}{x + 1}}{\color{blue}{y + x}} \]
    17. Simplified75.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + 1}}{y + x}} \]

    if -2.7000000000000002e-22 < x < -5.40000000000000039e-62

    1. Initial program 76.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative99.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative99.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative99.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg99.4%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative99.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified99.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 85.7%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative85.7%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified85.7%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity85.7%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot \left(y + 1\right)} \]
      2. times-frac85.5%

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
    9. Applied egg-rr85.5%

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
    10. Step-by-step derivation
      1. associate-*l/85.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y + 1}}{y}} \]
      2. *-lft-identity85.7%

        \[\leadsto \frac{\color{blue}{\frac{x}{y + 1}}}{y} \]
    11. Simplified85.7%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + 1}}{y}} \]
    12. Step-by-step derivation
      1. clear-num85.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\frac{x}{y + 1}}}} \]
      2. inv-pow85.7%

        \[\leadsto \color{blue}{{\left(\frac{y}{\frac{x}{y + 1}}\right)}^{-1}} \]
      3. associate-/r/85.9%

        \[\leadsto {\color{blue}{\left(\frac{y}{x} \cdot \left(y + 1\right)\right)}}^{-1} \]
    13. Applied egg-rr85.9%

      \[\leadsto \color{blue}{{\left(\frac{y}{x} \cdot \left(y + 1\right)\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-185.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x} \cdot \left(y + 1\right)}} \]
      2. +-commutative85.9%

        \[\leadsto \frac{1}{\frac{y}{x} \cdot \color{blue}{\left(1 + y\right)}} \]
      3. *-commutative85.9%

        \[\leadsto \frac{1}{\color{blue}{\left(1 + y\right) \cdot \frac{y}{x}}} \]
      4. +-commutative85.9%

        \[\leadsto \frac{1}{\color{blue}{\left(y + 1\right)} \cdot \frac{y}{x}} \]
    15. Simplified85.9%

      \[\leadsto \color{blue}{\frac{1}{\left(y + 1\right) \cdot \frac{y}{x}}} \]

    if -5.40000000000000039e-62 < x < -4.39999999999999984e-184

    1. Initial program 72.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.4%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.4%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.9%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.5%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 73.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{x} \]

    if -4.39999999999999984e-184 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac70.2%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/86.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative86.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in80.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified86.3%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef66.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult66.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times89.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num88.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/89.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity89.0%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow289.0%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr89.0%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 55.8%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y}} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification66.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+161}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{-62}:\\ \;\;\;\;\frac{1}{\left(y + 1\right) \cdot \frac{y}{x}}\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.9% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{y + x}\\ \mathbf{if}\;x \leq -3 \cdot 10^{+164}:\\ \;\;\;\;\frac{t_0}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-64}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{t_0}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (+ y x))))
   (if (<= x -3e+164)
     (/ t_0 x)
     (if (<= x -1.85e+15)
       (/ y (* (+ y x) (+ y x)))
       (if (<= x -4.8e-23)
         (/ (/ y (+ x 1.0)) (+ y x))
         (if (<= x -3.2e-64)
           (/ 1.0 (* (+ y x) (/ (+ y 1.0) x)))
           (if (<= x -2.9e-184)
             (* x (/ t_0 (+ y x)))
             (/ (/ x (+ y (+ x 1.0))) y))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -3e+164) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -4.8e-23) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -3.2e-64) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -2.9e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = y / (y + x)
    if (x <= (-3d+164)) then
        tmp = t_0 / x
    else if (x <= (-1.85d+15)) then
        tmp = y / ((y + x) * (y + x))
    else if (x <= (-4.8d-23)) then
        tmp = (y / (x + 1.0d0)) / (y + x)
    else if (x <= (-3.2d-64)) then
        tmp = 1.0d0 / ((y + x) * ((y + 1.0d0) / x))
    else if (x <= (-2.9d-184)) then
        tmp = x * (t_0 / (y + x))
    else
        tmp = (x / (y + (x + 1.0d0))) / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -3e+164) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -4.8e-23) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -3.2e-64) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -2.9e-184) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = y / (y + x)
	tmp = 0
	if x <= -3e+164:
		tmp = t_0 / x
	elif x <= -1.85e+15:
		tmp = y / ((y + x) * (y + x))
	elif x <= -4.8e-23:
		tmp = (y / (x + 1.0)) / (y + x)
	elif x <= -3.2e-64:
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x))
	elif x <= -2.9e-184:
		tmp = x * (t_0 / (y + x))
	else:
		tmp = (x / (y + (x + 1.0))) / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(y / Float64(y + x))
	tmp = 0.0
	if (x <= -3e+164)
		tmp = Float64(t_0 / x);
	elseif (x <= -1.85e+15)
		tmp = Float64(y / Float64(Float64(y + x) * Float64(y + x)));
	elseif (x <= -4.8e-23)
		tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x));
	elseif (x <= -3.2e-64)
		tmp = Float64(1.0 / Float64(Float64(y + x) * Float64(Float64(y + 1.0) / x)));
	elseif (x <= -2.9e-184)
		tmp = Float64(x * Float64(t_0 / Float64(y + x)));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = y / (y + x);
	tmp = 0.0;
	if (x <= -3e+164)
		tmp = t_0 / x;
	elseif (x <= -1.85e+15)
		tmp = y / ((y + x) * (y + x));
	elseif (x <= -4.8e-23)
		tmp = (y / (x + 1.0)) / (y + x);
	elseif (x <= -3.2e-64)
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	elseif (x <= -2.9e-184)
		tmp = x * (t_0 / (y + x));
	else
		tmp = (x / (y + (x + 1.0))) / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3e+164], N[(t$95$0 / x), $MachinePrecision], If[LessEqual[x, -1.85e+15], N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.8e-23], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-64], N[(1.0 / N[(N[(y + x), $MachinePrecision] * N[(N[(y + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e-184], N[(x * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -3 \cdot 10^{+164}:\\
\;\;\;\;\frac{t_0}{x}\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{elif}\;x \leq -4.8 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-64}:\\
\;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\

\mathbf{elif}\;x \leq -2.9 \cdot 10^{-184}:\\
\;\;\;\;x \cdot \frac{t_0}{y + x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -3.00000000000000001e164

    1. Initial program 52.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative76.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac52.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in3.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/52.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef0.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult0.0%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times76.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num76.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.9%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 92.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x}} \]

    if -3.00000000000000001e164 < x < -1.85e15

    1. Initial program 62.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*85.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative85.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/97.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative97.0%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/97.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative97.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 75.2%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{1} \]

    if -1.85e15 < x < -4.79999999999999993e-23

    1. Initial program 99.4%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.3%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.3%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac99.4%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/99.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative99.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in86.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef87.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult86.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.2%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around 0 75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + x}} \]
    8. Step-by-step derivation
      1. +-commutative75.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    9. Simplified75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    10. Step-by-step derivation
      1. clear-num75.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{\frac{y}{x + y}}}} \]
      2. inv-pow75.2%

        \[\leadsto \color{blue}{{\left(\frac{x + 1}{\frac{y}{x + y}}\right)}^{-1}} \]
      3. div-inv75.4%

        \[\leadsto {\color{blue}{\left(\left(x + 1\right) \cdot \frac{1}{\frac{y}{x + y}}\right)}}^{-1} \]
      4. clear-num75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \color{blue}{\frac{x + y}{y}}\right)}^{-1} \]
      5. +-commutative75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \frac{\color{blue}{y + x}}{y}\right)}^{-1} \]
    11. Applied egg-rr75.4%

      \[\leadsto \color{blue}{{\left(\left(x + 1\right) \cdot \frac{y + x}{y}\right)}^{-1}} \]
    12. Step-by-step derivation
      1. unpow-175.4%

        \[\leadsto \color{blue}{\frac{1}{\left(x + 1\right) \cdot \frac{y + x}{y}}} \]
      2. associate-*r/75.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    13. Simplified75.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    14. Step-by-step derivation
      1. clear-num75.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + 1\right) \cdot \left(y + x\right)}} \]
      2. *-un-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{\left(x + 1\right) \cdot \left(y + x\right)} \]
      3. +-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\left(x + 1\right) \cdot \color{blue}{\left(x + y\right)}} \]
      4. *-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + 1\right)}} \]
      5. times-frac75.6%

        \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    15. Applied egg-rr75.6%

      \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    16. Step-by-step derivation
      1. associate-*l/75.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + 1}}{x + y}} \]
      2. *-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + 1}}}{x + y} \]
      3. +-commutative75.6%

        \[\leadsto \frac{\frac{y}{x + 1}}{\color{blue}{y + x}} \]
    17. Simplified75.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + 1}}{y + x}} \]

    if -4.79999999999999993e-23 < x < -3.19999999999999975e-64

    1. Initial program 79.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.5%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.5%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.5%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.5%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac79.3%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/79.3%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative79.3%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative79.3%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in79.3%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def79.3%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative79.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative79.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult79.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative79.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified79.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/79.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef79.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult79.3%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in79.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+79.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative79.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.3%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.2%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around inf 87.6%

      \[\leadsto \frac{\color{blue}{1}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \]
    8. Taylor expanded in x around 0 87.6%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + y}{x}} \cdot \left(x + y\right)} \]
    9. Step-by-step derivation
      1. +-commutative87.6%

        \[\leadsto \frac{1}{\frac{\color{blue}{y + 1}}{x} \cdot \left(x + y\right)} \]
    10. Simplified87.6%

      \[\leadsto \frac{1}{\color{blue}{\frac{y + 1}{x}} \cdot \left(x + y\right)} \]

    if -3.19999999999999975e-64 < x < -2.90000000000000014e-184

    1. Initial program 71.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*71.3%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative71.3%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative71.3%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative71.3%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.5%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.4%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.5%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.5%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 76.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{x} \]

    if -2.90000000000000014e-184 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac70.2%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/86.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative86.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in80.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified86.3%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef66.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult66.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times89.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num88.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/89.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity89.0%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow289.0%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr89.0%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 55.8%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y}} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification66.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+164}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-64}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 86.0% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{y + x}\\ \mathbf{if}\;x \leq -3.6 \cdot 10^{+163}:\\ \;\;\;\;\frac{t_0}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-64}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \frac{t_0}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (+ y x))))
   (if (<= x -3.6e+163)
     (/ t_0 x)
     (if (<= x -1.85e+15)
       (/ y (* (+ y x) (+ y x)))
       (if (<= x -2.7e-22)
         (/ (/ y (+ x 1.0)) (+ y x))
         (if (<= x -6.5e-64)
           (/ 1.0 (* (+ y x) (/ (+ y 1.0) x)))
           (if (<= x -2e-185)
             (* x (/ t_0 (+ y x)))
             (/ (/ x (+ y (+ x 1.0))) (+ y x)))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -3.6e+163) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -2.7e-22) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -6.5e-64) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -2e-185) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + x);
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = y / (y + x)
    if (x <= (-3.6d+163)) then
        tmp = t_0 / x
    else if (x <= (-1.85d+15)) then
        tmp = y / ((y + x) * (y + x))
    else if (x <= (-2.7d-22)) then
        tmp = (y / (x + 1.0d0)) / (y + x)
    else if (x <= (-6.5d-64)) then
        tmp = 1.0d0 / ((y + x) * ((y + 1.0d0) / x))
    else if (x <= (-2d-185)) then
        tmp = x * (t_0 / (y + x))
    else
        tmp = (x / (y + (x + 1.0d0))) / (y + x)
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = y / (y + x);
	double tmp;
	if (x <= -3.6e+163) {
		tmp = t_0 / x;
	} else if (x <= -1.85e+15) {
		tmp = y / ((y + x) * (y + x));
	} else if (x <= -2.7e-22) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (x <= -6.5e-64) {
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	} else if (x <= -2e-185) {
		tmp = x * (t_0 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + x);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = y / (y + x)
	tmp = 0
	if x <= -3.6e+163:
		tmp = t_0 / x
	elif x <= -1.85e+15:
		tmp = y / ((y + x) * (y + x))
	elif x <= -2.7e-22:
		tmp = (y / (x + 1.0)) / (y + x)
	elif x <= -6.5e-64:
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x))
	elif x <= -2e-185:
		tmp = x * (t_0 / (y + x))
	else:
		tmp = (x / (y + (x + 1.0))) / (y + x)
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(y / Float64(y + x))
	tmp = 0.0
	if (x <= -3.6e+163)
		tmp = Float64(t_0 / x);
	elseif (x <= -1.85e+15)
		tmp = Float64(y / Float64(Float64(y + x) * Float64(y + x)));
	elseif (x <= -2.7e-22)
		tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x));
	elseif (x <= -6.5e-64)
		tmp = Float64(1.0 / Float64(Float64(y + x) * Float64(Float64(y + 1.0) / x)));
	elseif (x <= -2e-185)
		tmp = Float64(x * Float64(t_0 / Float64(y + x)));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + x));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = y / (y + x);
	tmp = 0.0;
	if (x <= -3.6e+163)
		tmp = t_0 / x;
	elseif (x <= -1.85e+15)
		tmp = y / ((y + x) * (y + x));
	elseif (x <= -2.7e-22)
		tmp = (y / (x + 1.0)) / (y + x);
	elseif (x <= -6.5e-64)
		tmp = 1.0 / ((y + x) * ((y + 1.0) / x));
	elseif (x <= -2e-185)
		tmp = x * (t_0 / (y + x));
	else
		tmp = (x / (y + (x + 1.0))) / (y + x);
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e+163], N[(t$95$0 / x), $MachinePrecision], If[LessEqual[x, -1.85e+15], N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.7e-22], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e-64], N[(1.0 / N[(N[(y + x), $MachinePrecision] * N[(N[(y + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2e-185], N[(x * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+163}:\\
\;\;\;\;\frac{t_0}{x}\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{elif}\;x \leq -2.7 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\mathbf{elif}\;x \leq -6.5 \cdot 10^{-64}:\\
\;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\

\mathbf{elif}\;x \leq -2 \cdot 10^{-185}:\\
\;\;\;\;x \cdot \frac{t_0}{y + x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -3.59999999999999978e163

    1. Initial program 52.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative76.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac52.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in3.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/52.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef0.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult0.0%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times76.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num76.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.9%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 92.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x}} \]

    if -3.59999999999999978e163 < x < -1.85e15

    1. Initial program 62.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*85.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative85.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative85.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/97.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative97.0%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/97.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative97.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+97.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 75.2%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{1} \]

    if -1.85e15 < x < -2.7000000000000002e-22

    1. Initial program 99.4%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.3%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.3%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.3%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac99.4%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/99.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative99.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in86.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def99.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative99.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef87.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult86.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative99.4%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.2%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around 0 75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + x}} \]
    8. Step-by-step derivation
      1. +-commutative75.4%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    9. Simplified75.4%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    10. Step-by-step derivation
      1. clear-num75.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{\frac{y}{x + y}}}} \]
      2. inv-pow75.2%

        \[\leadsto \color{blue}{{\left(\frac{x + 1}{\frac{y}{x + y}}\right)}^{-1}} \]
      3. div-inv75.4%

        \[\leadsto {\color{blue}{\left(\left(x + 1\right) \cdot \frac{1}{\frac{y}{x + y}}\right)}}^{-1} \]
      4. clear-num75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \color{blue}{\frac{x + y}{y}}\right)}^{-1} \]
      5. +-commutative75.4%

        \[\leadsto {\left(\left(x + 1\right) \cdot \frac{\color{blue}{y + x}}{y}\right)}^{-1} \]
    11. Applied egg-rr75.4%

      \[\leadsto \color{blue}{{\left(\left(x + 1\right) \cdot \frac{y + x}{y}\right)}^{-1}} \]
    12. Step-by-step derivation
      1. unpow-175.4%

        \[\leadsto \color{blue}{\frac{1}{\left(x + 1\right) \cdot \frac{y + x}{y}}} \]
      2. associate-*r/75.4%

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    13. Simplified75.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + 1\right) \cdot \left(y + x\right)}{y}}} \]
    14. Step-by-step derivation
      1. clear-num75.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + 1\right) \cdot \left(y + x\right)}} \]
      2. *-un-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{\left(x + 1\right) \cdot \left(y + x\right)} \]
      3. +-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\left(x + 1\right) \cdot \color{blue}{\left(x + y\right)}} \]
      4. *-commutative75.6%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + 1\right)}} \]
      5. times-frac75.6%

        \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    15. Applied egg-rr75.6%

      \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{y}{x + 1}} \]
    16. Step-by-step derivation
      1. associate-*l/75.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + 1}}{x + y}} \]
      2. *-lft-identity75.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + 1}}}{x + y} \]
      3. +-commutative75.6%

        \[\leadsto \frac{\frac{y}{x + 1}}{\color{blue}{y + x}} \]
    17. Simplified75.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + 1}}{y + x}} \]

    if -2.7000000000000002e-22 < x < -6.5000000000000004e-64

    1. Initial program 76.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative99.6%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative99.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative99.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac76.8%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.8%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.8%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.8%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/76.8%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult76.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative76.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num99.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.3%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around inf 86.1%

      \[\leadsto \frac{\color{blue}{1}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \]
    8. Taylor expanded in x around 0 86.1%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + y}{x}} \cdot \left(x + y\right)} \]
    9. Step-by-step derivation
      1. +-commutative86.1%

        \[\leadsto \frac{1}{\frac{\color{blue}{y + 1}}{x} \cdot \left(x + y\right)} \]
    10. Simplified86.1%

      \[\leadsto \frac{1}{\color{blue}{\frac{y + 1}{x}} \cdot \left(x + y\right)} \]

    if -6.5000000000000004e-64 < x < -2e-185

    1. Initial program 72.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.4%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.4%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.4%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.9%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.5%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified99.6%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 73.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{x} \]

    if -2e-185 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac70.2%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/86.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative86.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in80.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified86.3%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef66.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult66.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times89.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative89.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num89.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.7%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around inf 56.6%

      \[\leadsto \frac{\color{blue}{1}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \]
    8. Step-by-step derivation
      1. clear-num56.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}{1}}} \]
      2. associate-/r/56.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \cdot 1} \]
      3. associate-/r*56.8%

        \[\leadsto \color{blue}{\frac{\frac{1}{\frac{y + \left(x + 1\right)}{x}}}{x + y}} \cdot 1 \]
      4. clear-num56.8%

        \[\leadsto \frac{\color{blue}{\frac{x}{y + \left(x + 1\right)}}}{x + y} \cdot 1 \]
      5. +-commutative56.8%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y + x}} \cdot 1 \]
    9. Applied egg-rr56.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{y + x} \cdot 1} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification66.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+163}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-64}:\\ \;\;\;\;\frac{1}{\left(y + x\right) \cdot \frac{y + 1}{x}}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 92.4% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ t_1 := \frac{y}{y + x}\\ \mathbf{if}\;x \leq -9.4 \cdot 10^{+163}:\\ \;\;\;\;\frac{t_1}{\left(x + 1\right) + y \cdot 2}\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{x}{x + 1} \cdot t_0\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-163}:\\ \;\;\;\;\frac{x}{y + 1} \cdot t_0\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \frac{t_1}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (* (+ y x) (+ y x)))) (t_1 (/ y (+ y x))))
   (if (<= x -9.4e+163)
     (/ t_1 (+ (+ x 1.0) (* y 2.0)))
     (if (<= x -1.5e-6)
       (* (/ x (+ x 1.0)) t_0)
       (if (<= x -1.25e-163)
         (* (/ x (+ y 1.0)) t_0)
         (if (<= x -2e-185)
           (* x (/ t_1 (+ y x)))
           (/ (/ x (+ y (+ x 1.0))) (+ y (* x 2.0)))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = y / ((y + x) * (y + x));
	double t_1 = y / (y + x);
	double tmp;
	if (x <= -9.4e+163) {
		tmp = t_1 / ((x + 1.0) + (y * 2.0));
	} else if (x <= -1.5e-6) {
		tmp = (x / (x + 1.0)) * t_0;
	} else if (x <= -1.25e-163) {
		tmp = (x / (y + 1.0)) * t_0;
	} else if (x <= -2e-185) {
		tmp = x * (t_1 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = y / ((y + x) * (y + x))
    t_1 = y / (y + x)
    if (x <= (-9.4d+163)) then
        tmp = t_1 / ((x + 1.0d0) + (y * 2.0d0))
    else if (x <= (-1.5d-6)) then
        tmp = (x / (x + 1.0d0)) * t_0
    else if (x <= (-1.25d-163)) then
        tmp = (x / (y + 1.0d0)) * t_0
    else if (x <= (-2d-185)) then
        tmp = x * (t_1 / (y + x))
    else
        tmp = (x / (y + (x + 1.0d0))) / (y + (x * 2.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = y / ((y + x) * (y + x));
	double t_1 = y / (y + x);
	double tmp;
	if (x <= -9.4e+163) {
		tmp = t_1 / ((x + 1.0) + (y * 2.0));
	} else if (x <= -1.5e-6) {
		tmp = (x / (x + 1.0)) * t_0;
	} else if (x <= -1.25e-163) {
		tmp = (x / (y + 1.0)) * t_0;
	} else if (x <= -2e-185) {
		tmp = x * (t_1 / (y + x));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = y / ((y + x) * (y + x))
	t_1 = y / (y + x)
	tmp = 0
	if x <= -9.4e+163:
		tmp = t_1 / ((x + 1.0) + (y * 2.0))
	elif x <= -1.5e-6:
		tmp = (x / (x + 1.0)) * t_0
	elif x <= -1.25e-163:
		tmp = (x / (y + 1.0)) * t_0
	elif x <= -2e-185:
		tmp = x * (t_1 / (y + x))
	else:
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(y / Float64(Float64(y + x) * Float64(y + x)))
	t_1 = Float64(y / Float64(y + x))
	tmp = 0.0
	if (x <= -9.4e+163)
		tmp = Float64(t_1 / Float64(Float64(x + 1.0) + Float64(y * 2.0)));
	elseif (x <= -1.5e-6)
		tmp = Float64(Float64(x / Float64(x + 1.0)) * t_0);
	elseif (x <= -1.25e-163)
		tmp = Float64(Float64(x / Float64(y + 1.0)) * t_0);
	elseif (x <= -2e-185)
		tmp = Float64(x * Float64(t_1 / Float64(y + x)));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + Float64(x * 2.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = y / ((y + x) * (y + x));
	t_1 = y / (y + x);
	tmp = 0.0;
	if (x <= -9.4e+163)
		tmp = t_1 / ((x + 1.0) + (y * 2.0));
	elseif (x <= -1.5e-6)
		tmp = (x / (x + 1.0)) * t_0;
	elseif (x <= -1.25e-163)
		tmp = (x / (y + 1.0)) * t_0;
	elseif (x <= -2e-185)
		tmp = x * (t_1 / (y + x));
	else
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.4e+163], N[(t$95$1 / N[(N[(x + 1.0), $MachinePrecision] + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-6], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, -1.25e-163], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, -2e-185], N[(x * N[(t$95$1 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
t_1 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -9.4 \cdot 10^{+163}:\\
\;\;\;\;\frac{t_1}{\left(x + 1\right) + y \cdot 2}\\

\mathbf{elif}\;x \leq -1.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{x}{x + 1} \cdot t_0\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{y + 1} \cdot t_0\\

\mathbf{elif}\;x \leq -2 \cdot 10^{-185}:\\
\;\;\;\;x \cdot \frac{t_1}{y + x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -9.40000000000000037e163

    1. Initial program 52.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative76.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac52.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in3.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/52.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef0.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult0.0%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times76.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num76.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.9%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 93.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + \left(x + 2 \cdot y\right)}} \]
    8. Step-by-step derivation
      1. associate-+r+93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(1 + x\right) + 2 \cdot y}} \]
      2. +-commutative93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + 1\right)} + 2 \cdot y} \]
      3. *-commutative93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\left(x + 1\right) + \color{blue}{y \cdot 2}} \]
    9. Simplified93.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + 1\right) + y \cdot 2}} \]

    if -9.40000000000000037e163 < x < -1.5e-6

    1. Initial program 66.4%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*87.2%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative87.2%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative87.2%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative87.2%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/97.2%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative97.2%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/97.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg97.4%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative97.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative97.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg97.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative97.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+97.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified97.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 77.7%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative77.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified77.7%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{x + 1}} \]

    if -1.5e-6 < x < -1.24999999999999994e-163

    1. Initial program 82.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*87.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative87.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative87.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative87.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/99.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative99.5%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/99.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg99.4%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative99.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified99.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{1 + y}} \]
    6. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{y + 1}} \]
    7. Simplified99.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{y + 1}} \]

    if -1.24999999999999994e-163 < x < -2e-185

    1. Initial program 40.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*40.0%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative40.0%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative40.0%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative40.0%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/41.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative41.4%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/41.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg41.4%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative41.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative41.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg41.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative41.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+41.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified41.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{x} \]

    if -2e-185 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative89.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac70.2%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/86.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative86.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in80.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def86.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative86.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative86.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified86.3%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef66.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult66.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative70.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times89.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num88.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/89.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity89.0%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+89.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow289.0%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr89.0%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 57.0%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y + 2 \cdot x}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification70.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.4 \cdot 10^{+163}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{\left(x + 1\right) + y \cdot 2}\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{x}{x + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-163}:\\ \;\;\;\;\frac{x}{y + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 94.4% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.32 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + 1}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{x}{y + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+224}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y 1.32e-17)
   (* (/ (/ y (+ y x)) (+ y x)) (/ x (+ x 1.0)))
   (if (<= y 8.2e+141)
     (* (/ x (+ y 1.0)) (/ y (* (+ y x) (+ y x))))
     (if (<= y 1.4e+224)
       (/ (/ x (+ y (+ x 1.0))) (+ y (* x 2.0)))
       (/ x (* y (+ y 1.0)))))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 1.32e-17) {
		tmp = ((y / (y + x)) / (y + x)) * (x / (x + 1.0));
	} else if (y <= 8.2e+141) {
		tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x)));
	} else if (y <= 1.4e+224) {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 1.32d-17) then
        tmp = ((y / (y + x)) / (y + x)) * (x / (x + 1.0d0))
    else if (y <= 8.2d+141) then
        tmp = (x / (y + 1.0d0)) * (y / ((y + x) * (y + x)))
    else if (y <= 1.4d+224) then
        tmp = (x / (y + (x + 1.0d0))) / (y + (x * 2.0d0))
    else
        tmp = x / (y * (y + 1.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 1.32e-17) {
		tmp = ((y / (y + x)) / (y + x)) * (x / (x + 1.0));
	} else if (y <= 8.2e+141) {
		tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x)));
	} else if (y <= 1.4e+224) {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 1.32e-17:
		tmp = ((y / (y + x)) / (y + x)) * (x / (x + 1.0))
	elif y <= 8.2e+141:
		tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x)))
	elif y <= 1.4e+224:
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0))
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 1.32e-17)
		tmp = Float64(Float64(Float64(y / Float64(y + x)) / Float64(y + x)) * Float64(x / Float64(x + 1.0)));
	elseif (y <= 8.2e+141)
		tmp = Float64(Float64(x / Float64(y + 1.0)) * Float64(y / Float64(Float64(y + x) * Float64(y + x))));
	elseif (y <= 1.4e+224)
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + Float64(x * 2.0)));
	else
		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 1.32e-17)
		tmp = ((y / (y + x)) / (y + x)) * (x / (x + 1.0));
	elseif (y <= 8.2e+141)
		tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x)));
	elseif (y <= 1.4e+224)
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, 1.32e-17], N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+141], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+224], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.32 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + 1}\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+141}:\\
\;\;\;\;\frac{x}{y + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+224}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < 1.3200000000000001e-17

    1. Initial program 72.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*75.1%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative75.1%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative75.1%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative75.1%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/88.2%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative88.2%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/88.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg88.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative88.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified88.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Taylor expanded in y around 0 82.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + x}} \]
    10. Step-by-step derivation
      1. +-commutative77.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + 1}} \]
    11. Simplified82.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{x + 1}} \]

    if 1.3200000000000001e-17 < y < 8.20000000000000044e141

    1. Initial program 68.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*83.4%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative83.4%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative83.4%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative83.4%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/94.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative94.6%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/94.6%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg94.6%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative94.6%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative94.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg94.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative94.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+94.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 75.3%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{1 + y}} \]
    6. Step-by-step derivation
      1. +-commutative75.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{y + 1}} \]
    7. Simplified75.3%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{y + 1}} \]

    if 8.20000000000000044e141 < y < 1.40000000000000004e224

    1. Initial program 49.7%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac83.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative83.6%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative83.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative83.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac49.7%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/66.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative66.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative66.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in60.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def66.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative66.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative66.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult66.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative66.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified66.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/49.7%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef49.7%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult49.7%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in49.7%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+49.7%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative49.7%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times83.7%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num83.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/83.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity83.7%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+83.7%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative83.7%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+83.7%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow283.7%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr83.7%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 78.3%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y + 2 \cdot x}} \]

    if 1.40000000000000004e224 < y

    1. Initial program 52.9%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*52.9%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative52.9%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative52.9%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative52.9%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/98.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative98.6%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/98.6%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg98.6%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative98.6%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative98.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg98.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative98.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+98.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 98.6%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative98.6%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified98.6%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification82.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.32 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + 1}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{x}{y + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+224}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 79.1% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-24} \lor \neg \left(x \leq -6.2 \cdot 10^{-164}\right) \land x \leq -4.4 \cdot 10^{-184}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= x -1.0)
   (/ (/ y x) x)
   (if (or (<= x -1.05e-24) (and (not (<= x -6.2e-164)) (<= x -4.4e-184)))
     (/ y x)
     (/ x (* y (+ y 1.0))))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if ((x <= -1.05e-24) || (!(x <= -6.2e-164) && (x <= -4.4e-184))) {
		tmp = y / x;
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.0d0)) then
        tmp = (y / x) / x
    else if ((x <= (-1.05d-24)) .or. (.not. (x <= (-6.2d-164))) .and. (x <= (-4.4d-184))) then
        tmp = y / x
    else
        tmp = x / (y * (y + 1.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if ((x <= -1.05e-24) || (!(x <= -6.2e-164) && (x <= -4.4e-184))) {
		tmp = y / x;
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if x <= -1.0:
		tmp = (y / x) / x
	elif (x <= -1.05e-24) or (not (x <= -6.2e-164) and (x <= -4.4e-184)):
		tmp = y / x
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(Float64(y / x) / x);
	elseif ((x <= -1.05e-24) || (!(x <= -6.2e-164) && (x <= -4.4e-184)))
		tmp = Float64(y / x);
	else
		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.0)
		tmp = (y / x) / x;
	elseif ((x <= -1.05e-24) || (~((x <= -6.2e-164)) && (x <= -4.4e-184)))
		tmp = y / x;
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[x, -1.05e-24], And[N[Not[LessEqual[x, -6.2e-164]], $MachinePrecision], LessEqual[x, -4.4e-184]]], N[(y / x), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\

\mathbf{elif}\;x \leq -1.05 \cdot 10^{-24} \lor \neg \left(x \leq -6.2 \cdot 10^{-164}\right) \land x \leq -4.4 \cdot 10^{-184}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1

    1. Initial program 59.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac88.0%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative88.0%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative88.0%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative88.0%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac59.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in36.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/59.5%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef31.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult31.7%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in59.5%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+59.5%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative59.5%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times88.0%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative88.0%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num87.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.7%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 73.3%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x}} \]
    8. Taylor expanded in y around 0 72.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]

    if -1 < x < -1.05e-24 or -6.2000000000000001e-164 < x < -4.39999999999999984e-184

    1. Initial program 61.9%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*61.9%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative61.9%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative61.9%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative61.9%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/63.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative63.0%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/63.0%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg63.0%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative63.0%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative63.0%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg63.0%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative63.0%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+63.0%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified63.0%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.2%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.2%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.2%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.4%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 91.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative91.8%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified91.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 64.0%

      \[\leadsto \color{blue}{\frac{y}{x}} \]

    if -1.05e-24 < x < -6.2000000000000001e-164 or -4.39999999999999984e-184 < x

    1. Initial program 72.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*75.5%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative75.5%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative75.5%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative75.5%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/91.1%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative91.1%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/91.1%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg91.1%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative91.1%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative91.1%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg91.1%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative91.1%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+91.1%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified91.1%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 58.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative58.1%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified58.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-24} \lor \neg \left(x \leq -6.2 \cdot 10^{-164}\right) \land x \leq -4.4 \cdot 10^{-184}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 96.8% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{if}\;y \leq 5 \cdot 10^{-73}:\\ \;\;\;\;t_0 \cdot \frac{x}{x + 1}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+176}:\\ \;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{x}{y + 1}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (/ y (+ y x)) (+ y x))))
   (if (<= y 5e-73)
     (* t_0 (/ x (+ x 1.0)))
     (if (<= y 2.1e+176)
       (* (/ x (+ x (+ y 1.0))) (/ y (* (+ y x) (+ y x))))
       (* t_0 (/ x (+ y 1.0)))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = (y / (y + x)) / (y + x);
	double tmp;
	if (y <= 5e-73) {
		tmp = t_0 * (x / (x + 1.0));
	} else if (y <= 2.1e+176) {
		tmp = (x / (x + (y + 1.0))) * (y / ((y + x) * (y + x)));
	} else {
		tmp = t_0 * (x / (y + 1.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (y / (y + x)) / (y + x)
    if (y <= 5d-73) then
        tmp = t_0 * (x / (x + 1.0d0))
    else if (y <= 2.1d+176) then
        tmp = (x / (x + (y + 1.0d0))) * (y / ((y + x) * (y + x)))
    else
        tmp = t_0 * (x / (y + 1.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = (y / (y + x)) / (y + x);
	double tmp;
	if (y <= 5e-73) {
		tmp = t_0 * (x / (x + 1.0));
	} else if (y <= 2.1e+176) {
		tmp = (x / (x + (y + 1.0))) * (y / ((y + x) * (y + x)));
	} else {
		tmp = t_0 * (x / (y + 1.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = (y / (y + x)) / (y + x)
	tmp = 0
	if y <= 5e-73:
		tmp = t_0 * (x / (x + 1.0))
	elif y <= 2.1e+176:
		tmp = (x / (x + (y + 1.0))) * (y / ((y + x) * (y + x)))
	else:
		tmp = t_0 * (x / (y + 1.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(Float64(y / Float64(y + x)) / Float64(y + x))
	tmp = 0.0
	if (y <= 5e-73)
		tmp = Float64(t_0 * Float64(x / Float64(x + 1.0)));
	elseif (y <= 2.1e+176)
		tmp = Float64(Float64(x / Float64(x + Float64(y + 1.0))) * Float64(y / Float64(Float64(y + x) * Float64(y + x))));
	else
		tmp = Float64(t_0 * Float64(x / Float64(y + 1.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = (y / (y + x)) / (y + x);
	tmp = 0.0;
	if (y <= 5e-73)
		tmp = t_0 * (x / (x + 1.0));
	elseif (y <= 2.1e+176)
		tmp = (x / (x + (y + 1.0))) * (y / ((y + x) * (y + x)));
	else
		tmp = t_0 * (x / (y + 1.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5e-73], N[(t$95$0 * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+176], N[(N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{if}\;y \leq 5 \cdot 10^{-73}:\\
\;\;\;\;t_0 \cdot \frac{x}{x + 1}\\

\mathbf{elif}\;y \leq 2.1 \cdot 10^{+176}:\\
\;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{x}{y + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 4.9999999999999998e-73

    1. Initial program 72.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*74.5%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative74.5%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative74.5%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative74.5%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.5%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.5%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.5%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.5%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.5%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.8%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Taylor expanded in y around 0 81.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + x}} \]
    10. Step-by-step derivation
      1. +-commutative76.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + 1}} \]
    11. Simplified81.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{x + 1}} \]

    if 4.9999999999999998e-73 < y < 2.0999999999999999e176

    1. Initial program 65.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*83.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative83.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative83.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative83.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/95.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative95.5%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/95.5%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg95.5%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative95.5%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative95.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg95.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative95.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+95.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing

    if 2.0999999999999999e176 < y

    1. Initial program 53.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*53.5%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative53.5%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative53.5%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative53.5%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.3%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.3%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.3%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.3%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.3%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.8%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.8%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.9%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 89.1%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative89.1%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified89.1%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5 \cdot 10^{-73}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + 1}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+176}:\\ \;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{y + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 88.9% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+161}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{\left(x + 1\right) + y \cdot 2}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-138}:\\ \;\;\;\;\frac{x}{x + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= x -2.9e+161)
   (/ (/ y (+ y x)) (+ (+ x 1.0) (* y 2.0)))
   (if (<= x -5.5e-138)
     (* (/ x (+ x 1.0)) (/ y (* (+ y x) (+ y x))))
     (/ (/ x (+ y (+ x 1.0))) (+ y (* x 2.0))))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -2.9e+161) {
		tmp = (y / (y + x)) / ((x + 1.0) + (y * 2.0));
	} else if (x <= -5.5e-138) {
		tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-2.9d+161)) then
        tmp = (y / (y + x)) / ((x + 1.0d0) + (y * 2.0d0))
    else if (x <= (-5.5d-138)) then
        tmp = (x / (x + 1.0d0)) * (y / ((y + x) * (y + x)))
    else
        tmp = (x / (y + (x + 1.0d0))) / (y + (x * 2.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (x <= -2.9e+161) {
		tmp = (y / (y + x)) / ((x + 1.0) + (y * 2.0));
	} else if (x <= -5.5e-138) {
		tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)));
	} else {
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if x <= -2.9e+161:
		tmp = (y / (y + x)) / ((x + 1.0) + (y * 2.0))
	elif x <= -5.5e-138:
		tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)))
	else:
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (x <= -2.9e+161)
		tmp = Float64(Float64(y / Float64(y + x)) / Float64(Float64(x + 1.0) + Float64(y * 2.0)));
	elseif (x <= -5.5e-138)
		tmp = Float64(Float64(x / Float64(x + 1.0)) * Float64(y / Float64(Float64(y + x) * Float64(y + x))));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + Float64(x * 2.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -2.9e+161)
		tmp = (y / (y + x)) / ((x + 1.0) + (y * 2.0));
	elseif (x <= -5.5e-138)
		tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)));
	else
		tmp = (x / (y + (x + 1.0))) / (y + (x * 2.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[x, -2.9e+161], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.5e-138], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+161}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{\left(x + 1\right) + y \cdot 2}\\

\mathbf{elif}\;x \leq -5.5 \cdot 10^{-138}:\\
\;\;\;\;\frac{x}{x + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.90000000000000016e161

    1. Initial program 52.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative76.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative76.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac52.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in3.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/52.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef0.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult0.0%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative52.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times76.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative76.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num76.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.9%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 93.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + \left(x + 2 \cdot y\right)}} \]
    8. Step-by-step derivation
      1. associate-+r+93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(1 + x\right) + 2 \cdot y}} \]
      2. +-commutative93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + 1\right)} + 2 \cdot y} \]
      3. *-commutative93.6%

        \[\leadsto \frac{\frac{y}{x + y}}{\left(x + 1\right) + \color{blue}{y \cdot 2}} \]
    9. Simplified93.6%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{\left(x + 1\right) + y \cdot 2}} \]

    if -2.90000000000000016e161 < x < -5.5000000000000003e-138

    1. Initial program 71.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*86.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative86.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative86.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative86.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/98.2%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative98.2%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/98.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg98.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative98.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative98.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg98.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative98.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+98.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified98.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 76.8%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative76.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified76.8%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{x + 1}} \]

    if -5.5000000000000003e-138 < x

    1. Initial program 70.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac88.2%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative88.2%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative88.2%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative88.2%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac70.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/85.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative85.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative85.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in79.3%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def85.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative85.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative85.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult85.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative85.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified85.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef66.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult66.8%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in70.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+70.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative70.0%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times88.1%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num87.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/87.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity87.8%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+87.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative87.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+87.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow287.8%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr87.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 57.7%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y + 2 \cdot x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+161}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{\left(x + 1\right) + y \cdot 2}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-138}:\\ \;\;\;\;\frac{x}{x + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 95.3% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{if}\;y \leq 1.32 \cdot 10^{-17}:\\ \;\;\;\;t_0 \cdot \frac{x}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{x}{y + 1}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (/ y (+ y x)) (+ y x))))
   (if (<= y 1.32e-17) (* t_0 (/ x (+ x 1.0))) (* t_0 (/ x (+ y 1.0))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = (y / (y + x)) / (y + x);
	double tmp;
	if (y <= 1.32e-17) {
		tmp = t_0 * (x / (x + 1.0));
	} else {
		tmp = t_0 * (x / (y + 1.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (y / (y + x)) / (y + x)
    if (y <= 1.32d-17) then
        tmp = t_0 * (x / (x + 1.0d0))
    else
        tmp = t_0 * (x / (y + 1.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double t_0 = (y / (y + x)) / (y + x);
	double tmp;
	if (y <= 1.32e-17) {
		tmp = t_0 * (x / (x + 1.0));
	} else {
		tmp = t_0 * (x / (y + 1.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = (y / (y + x)) / (y + x)
	tmp = 0
	if y <= 1.32e-17:
		tmp = t_0 * (x / (x + 1.0))
	else:
		tmp = t_0 * (x / (y + 1.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(Float64(y / Float64(y + x)) / Float64(y + x))
	tmp = 0.0
	if (y <= 1.32e-17)
		tmp = Float64(t_0 * Float64(x / Float64(x + 1.0)));
	else
		tmp = Float64(t_0 * Float64(x / Float64(y + 1.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = (y / (y + x)) / (y + x);
	tmp = 0.0;
	if (y <= 1.32e-17)
		tmp = t_0 * (x / (x + 1.0));
	else
		tmp = t_0 * (x / (y + 1.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.32e-17], N[(t$95$0 * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{if}\;y \leq 1.32 \cdot 10^{-17}:\\
\;\;\;\;t_0 \cdot \frac{x}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{x}{y + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.3200000000000001e-17

    1. Initial program 72.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*75.1%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative75.1%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative75.1%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative75.1%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/88.2%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative88.2%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/88.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg88.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative88.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+88.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified88.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Taylor expanded in y around 0 82.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + x}} \]
    10. Step-by-step derivation
      1. +-commutative77.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + 1}} \]
    11. Simplified82.3%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{x + 1}} \]

    if 1.3200000000000001e-17 < y

    1. Initial program 58.9%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*71.5%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative71.5%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative71.5%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative71.5%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/91.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative91.8%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/91.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg91.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative91.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.7%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.6%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 82.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative82.8%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified82.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.32 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{y + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 82.9% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 3.3 \cdot 10^{-78}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y 3.3e-78) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 3.3e-78) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 3.3d-78) then
        tmp = (y / x) / (x + 1.0d0)
    else
        tmp = (x / (y + (x + 1.0d0))) / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 3.3e-78) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 3.3e-78:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = (x / (y + (x + 1.0))) / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 3.3e-78)
		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 3.3e-78)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = (x / (y + (x + 1.0))) / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, 3.3e-78], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.3 \cdot 10^{-78}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.29999999999999982e-78

    1. Initial program 72.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*74.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative74.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.3%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.3%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.3%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.3%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.3%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 62.6%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*65.0%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative65.0%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    7. Simplified65.0%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]

    if 3.29999999999999982e-78 < y

    1. Initial program 61.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac92.8%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative92.8%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative92.8%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative92.8%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac61.3%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/81.4%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative81.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative81.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in74.5%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def81.4%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative81.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative81.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult81.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative81.4%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified81.4%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/61.3%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef58.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult58.1%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in61.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+61.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative61.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times92.8%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. clear-num92.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/92.3%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}}} \]
      10. *-un-lft-identity92.3%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      11. associate-+r+92.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      12. +-commutative92.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      13. associate-+l+92.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{y}} \]
      14. pow292.3%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{{\left(x + y\right)}^{2}}}{y}} \]
    6. Applied egg-rr92.3%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{{\left(x + y\right)}^{2}}{y}}} \]
    7. Taylor expanded in x around 0 68.0%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3.3 \cdot 10^{-78}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 67.0% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-184}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= x -1.0) (/ (/ y x) x) (if (<= x -4.4e-184) (/ y x) (/ x y))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if (x <= -4.4e-184) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.0d0)) then
        tmp = (y / x) / x
    else if (x <= (-4.4d-184)) then
        tmp = y / x
    else
        tmp = x / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if (x <= -4.4e-184) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if x <= -1.0:
		tmp = (y / x) / x
	elif x <= -4.4e-184:
		tmp = y / x
	else:
		tmp = x / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(Float64(y / x) / x);
	elseif (x <= -4.4e-184)
		tmp = Float64(y / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.0)
		tmp = (y / x) / x;
	elseif (x <= -4.4e-184)
		tmp = y / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -4.4e-184], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\

\mathbf{elif}\;x \leq -4.4 \cdot 10^{-184}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1

    1. Initial program 59.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac88.0%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative88.0%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative88.0%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative88.0%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac59.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/76.2%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative76.2%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in36.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def76.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative76.2%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified76.2%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/59.5%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef31.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult31.7%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in59.5%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+59.5%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative59.5%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times88.0%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative88.0%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num87.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.7%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in x around inf 73.3%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x}} \]
    8. Taylor expanded in y around 0 72.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]

    if -1 < x < -4.39999999999999984e-184

    1. Initial program 76.9%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*81.7%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative81.7%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative81.7%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative81.7%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/91.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative91.8%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/91.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg91.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative91.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+91.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.5%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.4%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.5%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.5%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.4%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.5%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.5%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.5%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.5%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.5%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 97.9%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative97.9%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified97.9%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 39.5%

      \[\leadsto \color{blue}{\frac{y}{x}} \]

    if -4.39999999999999984e-184 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*73.2%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative73.2%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative73.2%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative73.2%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/89.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative89.4%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/89.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg89.4%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative89.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative89.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg89.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative89.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+89.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified89.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 56.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative56.1%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified56.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    8. Taylor expanded in y around 0 32.8%

      \[\leadsto \color{blue}{\frac{x}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-184}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 78.9% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.1 \cdot 10^{-79}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y 1.1e-79) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0)))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 1.1e-79) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 1.1d-79) then
        tmp = y / (x * (x + 1.0d0))
    else
        tmp = x / (y * (y + 1.0d0))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 1.1e-79) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 1.1e-79:
		tmp = y / (x * (x + 1.0))
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 1.1e-79)
		tmp = Float64(y / Float64(x * Float64(x + 1.0)));
	else
		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 1.1e-79)
		tmp = y / (x * (x + 1.0));
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, 1.1e-79], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.1 \cdot 10^{-79}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.0999999999999999e-79

    1. Initial program 72.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*74.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative74.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.3%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.3%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.3%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.3%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.3%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 62.6%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

    if 1.0999999999999999e-79 < y

    1. Initial program 61.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/92.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative92.8%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/92.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg92.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative92.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 69.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative69.4%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified69.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.1 \cdot 10^{-79}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 81.2% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 3.1 \cdot 10^{-81}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y 3.1e-81) (/ y (* x (+ x 1.0))) (/ (/ x (+ y 1.0)) y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 3.1e-81) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = (x / (y + 1.0)) / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 3.1d-81) then
        tmp = y / (x * (x + 1.0d0))
    else
        tmp = (x / (y + 1.0d0)) / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 3.1e-81) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = (x / (y + 1.0)) / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 3.1e-81:
		tmp = y / (x * (x + 1.0))
	else:
		tmp = (x / (y + 1.0)) / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 3.1e-81)
		tmp = Float64(y / Float64(x * Float64(x + 1.0)));
	else
		tmp = Float64(Float64(x / Float64(y + 1.0)) / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 3.1e-81)
		tmp = y / (x * (x + 1.0));
	else
		tmp = (x / (y + 1.0)) / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, 3.1e-81], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.1 \cdot 10^{-81}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.09999999999999988e-81

    1. Initial program 72.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*74.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative74.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.3%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.3%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.3%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.3%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.3%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 62.6%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

    if 3.09999999999999988e-81 < y

    1. Initial program 61.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/92.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative92.8%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/92.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg92.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative92.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 69.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative69.4%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified69.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity69.4%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot \left(y + 1\right)} \]
      2. times-frac67.3%

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
    9. Applied egg-rr67.3%

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
    10. Step-by-step derivation
      1. associate-*l/67.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y + 1}}{y}} \]
      2. *-lft-identity67.4%

        \[\leadsto \frac{\color{blue}{\frac{x}{y + 1}}}{y} \]
    11. Simplified67.4%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + 1}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3.1 \cdot 10^{-81}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 82.7% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 2.6 \cdot 10^{-78}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y 2.6e-78) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 2.6e-78) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + 1.0)) / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 2.6d-78) then
        tmp = (y / x) / (x + 1.0d0)
    else
        tmp = (x / (y + 1.0d0)) / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 2.6e-78) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + 1.0)) / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 2.6e-78:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = (x / (y + 1.0)) / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 2.6e-78)
		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x / Float64(y + 1.0)) / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 2.6e-78)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = (x / (y + 1.0)) / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, 2.6e-78], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{-78}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.6000000000000001e-78

    1. Initial program 72.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*74.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative74.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.3%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.3%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.3%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.3%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.3%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.3%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 62.6%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*65.0%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative65.0%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    7. Simplified65.0%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]

    if 2.6000000000000001e-78 < y

    1. Initial program 61.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.8%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.8%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.8%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.8%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/92.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative92.8%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/92.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg92.8%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative92.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+92.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 69.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative69.4%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified69.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity69.4%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot \left(y + 1\right)} \]
      2. times-frac67.3%

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
    9. Applied egg-rr67.3%

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
    10. Step-by-step derivation
      1. associate-*l/67.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y + 1}}{y}} \]
      2. *-lft-identity67.4%

        \[\leadsto \frac{\color{blue}{\frac{x}{y + 1}}}{y} \]
    11. Simplified67.4%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + 1}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.6 \cdot 10^{-78}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 27.7% accurate, 2.1× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-18}:\\ \;\;\;\;\frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y) :precision binary64 (if (<= x -9.5e-18) (/ 1.0 x) (/ x y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -9.5e-18) {
		tmp = 1.0 / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-9.5d-18)) then
        tmp = 1.0d0 / x
    else
        tmp = x / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (x <= -9.5e-18) {
		tmp = 1.0 / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if x <= -9.5e-18:
		tmp = 1.0 / x
	else:
		tmp = x / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (x <= -9.5e-18)
		tmp = Float64(1.0 / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -9.5e-18)
		tmp = 1.0 / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[x, -9.5e-18], N[(1.0 / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{1}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.5000000000000003e-18

    1. Initial program 61.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac88.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative88.4%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative88.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative88.4%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac61.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/77.1%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative77.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative77.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in37.3%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def77.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative77.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative77.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult77.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative77.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified77.1%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/61.2%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef33.2%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult33.1%

        \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in61.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+61.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative61.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times88.4%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative88.4%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num88.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.7%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around inf 29.2%

      \[\leadsto \frac{\color{blue}{1}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \]
    8. Taylor expanded in x around inf 6.3%

      \[\leadsto \frac{1}{\color{blue}{x}} \]

    if -9.5000000000000003e-18 < x

    1. Initial program 71.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*74.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative74.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative74.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/89.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative89.7%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/89.7%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg89.7%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative89.7%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative89.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg89.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative89.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+89.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 56.6%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative56.6%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified56.6%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    8. Taylor expanded in y around 0 32.0%

      \[\leadsto \color{blue}{\frac{x}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification24.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-18}:\\ \;\;\;\;\frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 43.7% accurate, 2.1× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.95 \cdot 10^{-130}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y) :precision binary64 (if (<= y 1.95e-130) (/ y x) (/ x y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 1.95e-130) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 1.95d-130) then
        tmp = y / x
    else
        tmp = x / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 1.95e-130) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 1.95e-130:
		tmp = y / x
	else:
		tmp = x / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 1.95e-130)
		tmp = Float64(y / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 1.95e-130)
		tmp = y / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, 1.95e-130], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.95 \cdot 10^{-130}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.95e-130

    1. Initial program 70.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*73.3%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative73.3%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative73.3%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative73.3%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/86.3%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative86.3%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/86.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg86.4%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative86.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative86.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg86.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative86.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+86.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.8%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Simplified99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \]
      2. associate-/r/99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{x + \left(y + 1\right)} \cdot x\right)} \]
      3. associate-+r+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(x + y\right) + 1}} \cdot x\right) \]
      4. +-commutative99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{\left(y + x\right)} + 1} \cdot x\right) \]
      5. associate-+l+99.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \left(\frac{1}{\color{blue}{y + \left(x + 1\right)}} \cdot x\right) \]
    10. Applied egg-rr99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\left(\frac{1}{y + \left(x + 1\right)} \cdot x\right)} \]
    11. Taylor expanded in x around 0 86.0%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    12. Step-by-step derivation
      1. +-commutative86.0%

        \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{\color{blue}{y + 1}} \]
    13. Simplified86.0%

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{y + 1}} \]
    14. Taylor expanded in y around 0 39.8%

      \[\leadsto \color{blue}{\frac{y}{x}} \]

    if 1.95e-130 < y

    1. Initial program 64.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*74.9%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative74.9%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative74.9%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative74.9%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/93.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative93.6%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/93.6%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg93.6%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative93.6%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative93.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg93.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative93.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+93.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified93.6%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 65.5%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative65.5%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified65.5%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    8. Taylor expanded in y around 0 34.2%

      \[\leadsto \color{blue}{\frac{x}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.95 \cdot 10^{-130}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 4.4% accurate, 5.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{1}{x} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y) :precision binary64 (/ 1.0 x))
assert(x < y);
double code(double x, double y) {
	return 1.0 / x;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 / x
end function
assert x < y;
public static double code(double x, double y) {
	return 1.0 / x;
}
[x, y] = sort([x, y])
def code(x, y):
	return 1.0 / x
x, y = sort([x, y])
function code(x, y)
	return Float64(1.0 / x)
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
	tmp = 1.0 / x;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{1}{x}
\end{array}
Derivation
  1. Initial program 68.3%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac89.4%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. +-commutative89.4%

      \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
    3. +-commutative89.4%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
    4. +-commutative89.4%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
    5. times-frac68.3%

      \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    6. associate-*l/83.7%

      \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
    7. *-commutative83.7%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    8. *-commutative83.7%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
    9. distribute-rgt1-in68.1%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
    10. fma-def83.7%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
    11. +-commutative83.7%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
    12. +-commutative83.7%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
    13. cube-unmult83.7%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
    14. +-commutative83.7%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
  3. Simplified83.7%

    \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-*r/68.3%

      \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    2. fma-udef57.7%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    3. cube-mult57.7%

      \[\leadsto \frac{y \cdot x}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    4. distribute-rgt1-in68.3%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    5. associate-+r+68.3%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
    6. *-commutative68.3%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
    7. frac-times89.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    8. *-commutative89.4%

      \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
    9. clear-num89.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
    10. associate-/r*99.6%

      \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
    11. frac-times99.7%

      \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
    12. *-un-lft-identity99.7%

      \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
    13. associate-+r+99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
    14. +-commutative99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
    15. associate-+l+99.7%

      \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
  6. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
  7. Taylor expanded in y around inf 49.1%

    \[\leadsto \frac{\color{blue}{1}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)} \]
  8. Taylor expanded in x around inf 4.6%

    \[\leadsto \frac{1}{\color{blue}{x}} \]
  9. Final simplification4.6%

    \[\leadsto \frac{1}{x} \]
  10. Add Preprocessing

Developer target: 99.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y):
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y)
	return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x))))
end
function tmp = code(x, y)
	tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}

Reproduce

?
herbie shell --seed 2024018 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))

  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))