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

Percentage Accurate: 68.7% → 99.8%
Time: 12.4s
Alternatives: 19
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 19 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: 68.7% 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{\frac{y}{1 + \frac{y}{x}}}{y + 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 (+ 1.0 (/ y x))) (+ y x)) (+ x (+ y 1.0))))
assert(x < y);
double code(double x, double y) {
	return ((y / (1.0 + (y / x))) / (y + 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 / (1.0d0 + (y / x))) / (y + x)) / (x + (y + 1.0d0))
end function
assert x < y;
public static double code(double x, double y) {
	return ((y / (1.0 + (y / x))) / (y + x)) / (x + (y + 1.0));
}
[x, y] = sort([x, y])
def code(x, y):
	return ((y / (1.0 + (y / x))) / (y + x)) / (x + (y + 1.0))
x, y = sort([x, y])
function code(x, y)
	return Float64(Float64(Float64(y / Float64(1.0 + Float64(y / x))) / Float64(y + x)) / Float64(x + Float64(y + 1.0)))
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
	tmp = ((y / (1.0 + (y / x))) / (y + 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[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{\frac{y}{1 + \frac{y}{x}}}{y + x}}{x + \left(y + 1\right)}
\end{array}
Derivation
  1. Initial program 68.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
    3. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
    8. associate-+l+N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
    9. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
    10. +-lowering-+.f6468.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
  3. Simplified68.8%

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

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

      \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    6. associate-/l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    7. clear-numN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    8. un-div-invN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    11. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    12. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
    13. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
    14. +-lowering-+.f6499.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
  6. Applied egg-rr99.8%

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

    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \color{blue}{\left(1 + \frac{y}{x}\right)}\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
  8. Step-by-step derivation
    1. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{y}{x}\right)\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
    2. /-lowering-/.f6499.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
  9. Simplified99.8%

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

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

Alternative 2: 90.6% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 9.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\ \mathbf{elif}\;y \leq 3200000:\\ \;\;\;\;x \cdot \frac{\frac{1}{y + x}}{y + \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{x}{y + x}}{y + x}}{\frac{y + 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 9.5e-152)
   (/ (/ y (+ y x)) (+ x (+ y 1.0)))
   (if (<= y 3200000.0)
     (* x (/ (/ 1.0 (+ y x)) (+ y (+ 1.0 x))))
     (/ (/ (/ x (+ y x)) (+ y x)) (/ (+ y x) y)))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 9.5e-152) {
		tmp = (y / (y + x)) / (x + (y + 1.0));
	} else if (y <= 3200000.0) {
		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + x)));
	} else {
		tmp = ((x / (y + x)) / (y + x)) / ((y + 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 <= 9.5d-152) then
        tmp = (y / (y + x)) / (x + (y + 1.0d0))
    else if (y <= 3200000.0d0) then
        tmp = x * ((1.0d0 / (y + x)) / (y + (1.0d0 + x)))
    else
        tmp = ((x / (y + x)) / (y + x)) / ((y + x) / y)
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 9.5e-152) {
		tmp = (y / (y + x)) / (x + (y + 1.0));
	} else if (y <= 3200000.0) {
		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + x)));
	} else {
		tmp = ((x / (y + x)) / (y + x)) / ((y + x) / y);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 9.5e-152:
		tmp = (y / (y + x)) / (x + (y + 1.0))
	elif y <= 3200000.0:
		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + x)))
	else:
		tmp = ((x / (y + x)) / (y + x)) / ((y + x) / y)
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 9.5e-152)
		tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + Float64(y + 1.0)));
	elseif (y <= 3200000.0)
		tmp = Float64(x * Float64(Float64(1.0 / Float64(y + x)) / Float64(y + Float64(1.0 + x))));
	else
		tmp = Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) / Float64(Float64(y + x) / y));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 9.5e-152)
		tmp = (y / (y + x)) / (x + (y + 1.0));
	elseif (y <= 3200000.0)
		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + x)));
	else
		tmp = ((x / (y + x)) / (y + x)) / ((y + 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, 9.5e-152], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3200000.0], N[(x * N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.5 \cdot 10^{-152}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\

\mathbf{elif}\;y \leq 3200000:\\
\;\;\;\;x \cdot \frac{\frac{1}{y + x}}{y + \left(1 + x\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{x}{y + x}}{y + x}}{\frac{y + x}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 9.49999999999999925e-152

    1. Initial program 68.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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
      8. associate-+l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
      10. +-lowering-+.f6468.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
    3. Simplified68.6%

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

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

        \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      8. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
      14. +-lowering-+.f6499.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
    6. Applied egg-rr99.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{y}, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
    8. Step-by-step derivation
      1. Simplified62.8%

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

      if 9.49999999999999925e-152 < y < 3.2e6

      1. Initial program 86.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. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
        8. associate-+l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
        10. +-lowering-+.f6486.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
      3. Simplified86.6%

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

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

          \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        6. associate-/l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        8. un-div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        12. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
        14. +-lowering-+.f6499.9%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{x}, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
      8. Step-by-step derivation
        1. Simplified43.7%

          \[\leadsto \frac{\frac{\color{blue}{x}}{x + y}}{x + \left(y + 1\right)} \]
        2. Step-by-step derivation
          1. div-invN/A

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

            \[\leadsto x \cdot \color{blue}{\frac{\frac{1}{x + y}}{x + \left(y + 1\right)}} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{\frac{1}{x + y}}{x + \left(y + 1\right)}\right)}\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(\frac{1}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right)\right) \]
          6. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y + x\right)\right), \left(x + \left(y + 1\right)\right)\right)\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(x + \left(y + 1\right)\right)\right)\right) \]
          8. associate-+r+N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(\left(x + y\right) + \color{blue}{1}\right)\right)\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(\left(y + x\right) + 1\right)\right)\right) \]
          10. associate-+l+N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(y + \color{blue}{\left(x + 1\right)}\right)\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(y, \color{blue}{\left(x + 1\right)}\right)\right)\right) \]
          12. +-lowering-+.f6475.4%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(y, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right)\right) \]
        3. Applied egg-rr75.4%

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

        if 3.2e6 < y

        1. Initial program 60.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. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
          8. associate-+l+N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
          9. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
          10. +-lowering-+.f6460.6%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
        3. Simplified60.6%

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

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

            \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          6. associate-/l*N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          8. un-div-invN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          12. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
          14. +-lowering-+.f6499.9%

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

          \[\leadsto \color{blue}{\frac{\frac{\frac{y}{\frac{x + y}{x}}}{x + y}}{x + \left(y + 1\right)}} \]
        7. Step-by-step derivation
          1. associate-/l/N/A

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

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

            \[\leadsto \frac{y}{x + y} \cdot \color{blue}{\frac{x}{\left(x + \left(y + 1\right)\right) \cdot \left(x + y\right)}} \]
          4. associate-/l/N/A

            \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
          5. *-commutativeN/A

            \[\leadsto \frac{\frac{x}{x + y}}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{y}{x + y}} \]
          6. clear-numN/A

            \[\leadsto \frac{\frac{x}{x + y}}{x + \left(y + 1\right)} \cdot \frac{1}{\color{blue}{\frac{x + y}{y}}} \]
          7. un-div-invN/A

            \[\leadsto \frac{\frac{\frac{x}{x + y}}{x + \left(y + 1\right)}}{\color{blue}{\frac{x + y}{y}}} \]
          8. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x}{x + y}}{x + \left(y + 1\right)}\right), \color{blue}{\left(\frac{x + y}{y}\right)}\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x}{x + y}\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{\color{blue}{x + y}}{y}\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{\color{blue}{x} + y}{y}\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y + x\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{x + y}{y}\right)\right) \]
          12. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{x + y}{y}\right)\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \left(y + 1\right)\right)\right), \left(\frac{x + \color{blue}{y}}{y}\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \left(\frac{x + y}{y}\right)\right) \]
          15. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(\left(x + y\right), \color{blue}{y}\right)\right) \]
          16. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(\left(y + x\right), y\right)\right) \]
          17. +-lowering-+.f6499.9%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(y, x\right), y\right)\right) \]
        8. Applied egg-rr99.9%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \color{blue}{y}\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(y, x\right), y\right)\right) \]
        10. Step-by-step derivation
          1. Simplified99.9%

            \[\leadsto \frac{\frac{\frac{x}{y + x}}{x + \color{blue}{y}}}{\frac{y + x}{y}} \]
        11. Recombined 3 regimes into one program.
        12. Final simplification75.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 9.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\ \mathbf{elif}\;y \leq 3200000:\\ \;\;\;\;x \cdot \frac{\frac{1}{y + x}}{y + \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{x}{y + x}}{y + x}}{\frac{y + x}{y}}\\ \end{array} \]
        13. Add Preprocessing

        Alternative 3: 70.4% accurate, 0.8× speedup?

        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{x \cdot x}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{-105}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-170}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+24}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{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 (* x x))))
           (if (<= y -7.8e-105)
             t_0
             (if (<= y 2.05e-170) (/ y x) (if (<= y 2.4e+24) t_0 (/ (/ x y) y))))))
        assert(x < y);
        double code(double x, double y) {
        	double t_0 = y / (x * x);
        	double tmp;
        	if (y <= -7.8e-105) {
        		tmp = t_0;
        	} else if (y <= 2.05e-170) {
        		tmp = y / x;
        	} else if (y <= 2.4e+24) {
        		tmp = t_0;
        	} else {
        		tmp = (x / y) / 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 / (x * x)
            if (y <= (-7.8d-105)) then
                tmp = t_0
            else if (y <= 2.05d-170) then
                tmp = y / x
            else if (y <= 2.4d+24) then
                tmp = t_0
            else
                tmp = (x / y) / y
            end if
            code = tmp
        end function
        
        assert x < y;
        public static double code(double x, double y) {
        	double t_0 = y / (x * x);
        	double tmp;
        	if (y <= -7.8e-105) {
        		tmp = t_0;
        	} else if (y <= 2.05e-170) {
        		tmp = y / x;
        	} else if (y <= 2.4e+24) {
        		tmp = t_0;
        	} else {
        		tmp = (x / y) / y;
        	}
        	return tmp;
        }
        
        [x, y] = sort([x, y])
        def code(x, y):
        	t_0 = y / (x * x)
        	tmp = 0
        	if y <= -7.8e-105:
        		tmp = t_0
        	elif y <= 2.05e-170:
        		tmp = y / x
        	elif y <= 2.4e+24:
        		tmp = t_0
        	else:
        		tmp = (x / y) / y
        	return tmp
        
        x, y = sort([x, y])
        function code(x, y)
        	t_0 = Float64(y / Float64(x * x))
        	tmp = 0.0
        	if (y <= -7.8e-105)
        		tmp = t_0;
        	elseif (y <= 2.05e-170)
        		tmp = Float64(y / x);
        	elseif (y <= 2.4e+24)
        		tmp = t_0;
        	else
        		tmp = Float64(Float64(x / y) / y);
        	end
        	return tmp
        end
        
        x, y = num2cell(sort([x, y])){:}
        function tmp_2 = code(x, y)
        	t_0 = y / (x * x);
        	tmp = 0.0;
        	if (y <= -7.8e-105)
        		tmp = t_0;
        	elseif (y <= 2.05e-170)
        		tmp = y / x;
        	elseif (y <= 2.4e+24)
        		tmp = t_0;
        	else
        		tmp = (x / y) / 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[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e-105], t$95$0, If[LessEqual[y, 2.05e-170], N[(y / x), $MachinePrecision], If[LessEqual[y, 2.4e+24], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [x, y] = \mathsf{sort}([x, y])\\
        \\
        \begin{array}{l}
        t_0 := \frac{y}{x \cdot x}\\
        \mathbf{if}\;y \leq -7.8 \cdot 10^{-105}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;y \leq 2.05 \cdot 10^{-170}:\\
        \;\;\;\;\frac{y}{x}\\
        
        \mathbf{elif}\;y \leq 2.4 \cdot 10^{+24}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{x}{y}}{y}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -7.8e-105 or 2.04999999999999983e-170 < y < 2.4000000000000001e24

          1. Initial program 75.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. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
            8. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            10. +-lowering-+.f6475.5%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
          3. Simplified75.5%

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

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

              \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            6. associate-/l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            7. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            8. un-div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            11. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
            14. +-lowering-+.f6499.8%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
          6. Applied egg-rr99.8%

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

            \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
          8. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left({x}^{2}\right)}\right) \]
            2. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(y, \left(x \cdot \color{blue}{x}\right)\right) \]
            3. *-lowering-*.f6442.8%

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
          9. Simplified42.8%

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

          if -7.8e-105 < y < 2.04999999999999983e-170

          1. Initial program 66.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. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
            8. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            10. +-lowering-+.f6466.8%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
          3. Simplified66.8%

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

            \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
            3. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
            4. +-lowering-+.f6484.6%

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
          7. Simplified84.6%

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

            \[\leadsto \color{blue}{\frac{y}{x}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f6470.9%

              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{x}\right) \]
          10. Simplified70.9%

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

          if 2.4000000000000001e24 < y

          1. Initial program 60.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. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
            8. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            10. +-lowering-+.f6460.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
          3. Simplified60.0%

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

            \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({y}^{2}\right)}\right) \]
            2. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(y \cdot \color{blue}{y}\right)\right) \]
            3. *-lowering-*.f6475.0%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right) \]
          7. Simplified75.0%

            \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
          8. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y}\right), \color{blue}{y}\right) \]
            3. /-lowering-/.f6474.8%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), y\right) \]
          9. Applied egg-rr74.8%

            \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 4: 68.5% accurate, 0.8× speedup?

        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{y}{x \cdot x}\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{-103}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-168}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+23}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot 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 (* x x))))
           (if (<= y -4.1e-103)
             t_0
             (if (<= y 5.4e-168) (/ y x) (if (<= y 1.7e+23) t_0 (/ x (* y y)))))))
        assert(x < y);
        double code(double x, double y) {
        	double t_0 = y / (x * x);
        	double tmp;
        	if (y <= -4.1e-103) {
        		tmp = t_0;
        	} else if (y <= 5.4e-168) {
        		tmp = y / x;
        	} else if (y <= 1.7e+23) {
        		tmp = t_0;
        	} else {
        		tmp = x / (y * 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 / (x * x)
            if (y <= (-4.1d-103)) then
                tmp = t_0
            else if (y <= 5.4d-168) then
                tmp = y / x
            else if (y <= 1.7d+23) then
                tmp = t_0
            else
                tmp = x / (y * y)
            end if
            code = tmp
        end function
        
        assert x < y;
        public static double code(double x, double y) {
        	double t_0 = y / (x * x);
        	double tmp;
        	if (y <= -4.1e-103) {
        		tmp = t_0;
        	} else if (y <= 5.4e-168) {
        		tmp = y / x;
        	} else if (y <= 1.7e+23) {
        		tmp = t_0;
        	} else {
        		tmp = x / (y * y);
        	}
        	return tmp;
        }
        
        [x, y] = sort([x, y])
        def code(x, y):
        	t_0 = y / (x * x)
        	tmp = 0
        	if y <= -4.1e-103:
        		tmp = t_0
        	elif y <= 5.4e-168:
        		tmp = y / x
        	elif y <= 1.7e+23:
        		tmp = t_0
        	else:
        		tmp = x / (y * y)
        	return tmp
        
        x, y = sort([x, y])
        function code(x, y)
        	t_0 = Float64(y / Float64(x * x))
        	tmp = 0.0
        	if (y <= -4.1e-103)
        		tmp = t_0;
        	elseif (y <= 5.4e-168)
        		tmp = Float64(y / x);
        	elseif (y <= 1.7e+23)
        		tmp = t_0;
        	else
        		tmp = Float64(x / Float64(y * y));
        	end
        	return tmp
        end
        
        x, y = num2cell(sort([x, y])){:}
        function tmp_2 = code(x, y)
        	t_0 = y / (x * x);
        	tmp = 0.0;
        	if (y <= -4.1e-103)
        		tmp = t_0;
        	elseif (y <= 5.4e-168)
        		tmp = y / x;
        	elseif (y <= 1.7e+23)
        		tmp = t_0;
        	else
        		tmp = x / (y * 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[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e-103], t$95$0, If[LessEqual[y, 5.4e-168], N[(y / x), $MachinePrecision], If[LessEqual[y, 1.7e+23], t$95$0, N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [x, y] = \mathsf{sort}([x, y])\\
        \\
        \begin{array}{l}
        t_0 := \frac{y}{x \cdot x}\\
        \mathbf{if}\;y \leq -4.1 \cdot 10^{-103}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;y \leq 5.4 \cdot 10^{-168}:\\
        \;\;\;\;\frac{y}{x}\\
        
        \mathbf{elif}\;y \leq 1.7 \cdot 10^{+23}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x}{y \cdot y}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -4.09999999999999996e-103 or 5.40000000000000031e-168 < y < 1.69999999999999996e23

          1. Initial program 75.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. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
            8. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            10. +-lowering-+.f6475.7%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
          3. Simplified75.7%

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

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

              \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            6. associate-/l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            7. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            8. un-div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            11. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
            14. +-lowering-+.f6499.8%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
          6. Applied egg-rr99.8%

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

            \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
          8. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left({x}^{2}\right)}\right) \]
            2. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(y, \left(x \cdot \color{blue}{x}\right)\right) \]
            3. *-lowering-*.f6443.1%

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right) \]
          9. Simplified43.1%

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

          if -4.09999999999999996e-103 < y < 5.40000000000000031e-168

          1. Initial program 66.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. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
            8. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            10. +-lowering-+.f6466.7%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
          3. Simplified66.7%

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

            \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
            3. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
            4. +-lowering-+.f6483.5%

              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
          7. Simplified83.5%

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

            \[\leadsto \color{blue}{\frac{y}{x}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f6470.0%

              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{x}\right) \]
          10. Simplified70.0%

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

          if 1.69999999999999996e23 < y

          1. Initial program 60.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. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
            8. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            10. +-lowering-+.f6460.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
          3. Simplified60.0%

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

            \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({y}^{2}\right)}\right) \]
            2. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(y \cdot \color{blue}{y}\right)\right) \]
            3. *-lowering-*.f6475.0%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right) \]
          7. Simplified75.0%

            \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 5: 98.4% accurate, 0.8× speedup?

        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{\frac{x}{y + x}}{y + x}}{\frac{y + x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{y}{1 + \frac{y}{x}}}{y + 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
         (if (<= x -1.0)
           (/ (/ (/ x (+ y x)) (+ y x)) (/ (+ y x) y))
           (/ (/ (/ y (+ 1.0 (/ y x))) (+ y x)) (+ y 1.0))))
        assert(x < y);
        double code(double x, double y) {
        	double tmp;
        	if (x <= -1.0) {
        		tmp = ((x / (y + x)) / (y + x)) / ((y + x) / y);
        	} else {
        		tmp = ((y / (1.0 + (y / x))) / (y + 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) :: tmp
            if (x <= (-1.0d0)) then
                tmp = ((x / (y + x)) / (y + x)) / ((y + x) / y)
            else
                tmp = ((y / (1.0d0 + (y / x))) / (y + x)) / (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 = ((x / (y + x)) / (y + x)) / ((y + x) / y);
        	} else {
        		tmp = ((y / (1.0 + (y / x))) / (y + x)) / (y + 1.0);
        	}
        	return tmp;
        }
        
        [x, y] = sort([x, y])
        def code(x, y):
        	tmp = 0
        	if x <= -1.0:
        		tmp = ((x / (y + x)) / (y + x)) / ((y + x) / y)
        	else:
        		tmp = ((y / (1.0 + (y / x))) / (y + x)) / (y + 1.0)
        	return tmp
        
        x, y = sort([x, y])
        function code(x, y)
        	tmp = 0.0
        	if (x <= -1.0)
        		tmp = Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) / Float64(Float64(y + x) / y));
        	else
        		tmp = Float64(Float64(Float64(y / Float64(1.0 + Float64(y / x))) / Float64(y + x)) / 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 = ((x / (y + x)) / (y + x)) / ((y + x) / y);
        	else
        		tmp = ((y / (1.0 + (y / x))) / (y + 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_] := If[LessEqual[x, -1.0], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        [x, y] = \mathsf{sort}([x, y])\\
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -1:\\
        \;\;\;\;\frac{\frac{\frac{x}{y + x}}{y + x}}{\frac{y + x}{y}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{\frac{y}{1 + \frac{y}{x}}}{y + x}}{y + 1}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -1

          1. Initial program 60.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. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
            7. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
            8. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            9. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
            10. +-lowering-+.f6460.9%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
          3. Simplified60.9%

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

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

              \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            6. associate-/l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            7. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            8. un-div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            11. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
            14. +-lowering-+.f6499.8%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
          6. Applied egg-rr99.8%

            \[\leadsto \color{blue}{\frac{\frac{\frac{y}{\frac{x + y}{x}}}{x + y}}{x + \left(y + 1\right)}} \]
          7. Step-by-step derivation
            1. associate-/l/N/A

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

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

              \[\leadsto \frac{y}{x + y} \cdot \color{blue}{\frac{x}{\left(x + \left(y + 1\right)\right) \cdot \left(x + y\right)}} \]
            4. associate-/l/N/A

              \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
            5. *-commutativeN/A

              \[\leadsto \frac{\frac{x}{x + y}}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{y}{x + y}} \]
            6. clear-numN/A

              \[\leadsto \frac{\frac{x}{x + y}}{x + \left(y + 1\right)} \cdot \frac{1}{\color{blue}{\frac{x + y}{y}}} \]
            7. un-div-invN/A

              \[\leadsto \frac{\frac{\frac{x}{x + y}}{x + \left(y + 1\right)}}{\color{blue}{\frac{x + y}{y}}} \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x}{x + y}}{x + \left(y + 1\right)}\right), \color{blue}{\left(\frac{x + y}{y}\right)}\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x}{x + y}\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{\color{blue}{x + y}}{y}\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{\color{blue}{x} + y}{y}\right)\right) \]
            11. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y + x\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{x + y}{y}\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{x + y}{y}\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \left(y + 1\right)\right)\right), \left(\frac{x + \color{blue}{y}}{y}\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \left(\frac{x + y}{y}\right)\right) \]
            15. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(\left(x + y\right), \color{blue}{y}\right)\right) \]
            16. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(\left(y + x\right), y\right)\right) \]
            17. +-lowering-+.f6499.9%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(y, x\right), y\right)\right) \]
          8. Applied egg-rr99.9%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \color{blue}{y}\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(y, x\right), y\right)\right) \]
          10. Step-by-step derivation
            1. Simplified99.3%

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

            if -1 < x

            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. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
              3. associate-*l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
              7. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
              8. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
              9. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
              10. +-lowering-+.f6472.3%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
            3. Simplified72.3%

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

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

                \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
              4. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              6. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              7. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              8. un-div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              9. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              10. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              11. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              12. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
              14. +-lowering-+.f6499.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
            6. Applied egg-rr99.8%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \color{blue}{\left(1 + \frac{y}{x}\right)}\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
            8. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \left(\frac{y}{x}\right)\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
              2. /-lowering-/.f6499.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
            9. Simplified99.8%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \color{blue}{\left(1 + y\right)}\right) \]
            11. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(y + \color{blue}{1}\right)\right) \]
              2. +-lowering-+.f6486.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right) \]
            12. Simplified86.6%

              \[\leadsto \frac{\frac{\frac{y}{1 + \frac{y}{x}}}{x + y}}{\color{blue}{y + 1}} \]
          11. Recombined 2 regimes into one program.
          12. Final simplification90.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{\frac{x}{y + x}}{y + x}}{\frac{y + x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{y}{1 + \frac{y}{x}}}{y + x}}{y + 1}\\ \end{array} \]
          13. Add Preprocessing

          Alternative 6: 82.2% accurate, 0.9× speedup?

          \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;y \leq 5.5 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{t\_0}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{y}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \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 (+ x (+ y 1.0))))
             (if (<= y 5.5e-106)
               (/ (/ y (+ y x)) t_0)
               (if (<= y 6.5e+19) (/ (/ x y) t_0) (/ x (* (+ y x) (+ y x)))))))
          assert(x < y);
          double code(double x, double y) {
          	double t_0 = x + (y + 1.0);
          	double tmp;
          	if (y <= 5.5e-106) {
          		tmp = (y / (y + x)) / t_0;
          	} else if (y <= 6.5e+19) {
          		tmp = (x / y) / t_0;
          	} else {
          		tmp = x / ((y + x) * (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 = x + (y + 1.0d0)
              if (y <= 5.5d-106) then
                  tmp = (y / (y + x)) / t_0
              else if (y <= 6.5d+19) then
                  tmp = (x / y) / t_0
              else
                  tmp = x / ((y + x) * (y + x))
              end if
              code = tmp
          end function
          
          assert x < y;
          public static double code(double x, double y) {
          	double t_0 = x + (y + 1.0);
          	double tmp;
          	if (y <= 5.5e-106) {
          		tmp = (y / (y + x)) / t_0;
          	} else if (y <= 6.5e+19) {
          		tmp = (x / y) / t_0;
          	} else {
          		tmp = x / ((y + x) * (y + x));
          	}
          	return tmp;
          }
          
          [x, y] = sort([x, y])
          def code(x, y):
          	t_0 = x + (y + 1.0)
          	tmp = 0
          	if y <= 5.5e-106:
          		tmp = (y / (y + x)) / t_0
          	elif y <= 6.5e+19:
          		tmp = (x / y) / t_0
          	else:
          		tmp = x / ((y + x) * (y + x))
          	return tmp
          
          x, y = sort([x, y])
          function code(x, y)
          	t_0 = Float64(x + Float64(y + 1.0))
          	tmp = 0.0
          	if (y <= 5.5e-106)
          		tmp = Float64(Float64(y / Float64(y + x)) / t_0);
          	elseif (y <= 6.5e+19)
          		tmp = Float64(Float64(x / y) / t_0);
          	else
          		tmp = Float64(x / Float64(Float64(y + x) * Float64(y + x)));
          	end
          	return tmp
          end
          
          x, y = num2cell(sort([x, y])){:}
          function tmp_2 = code(x, y)
          	t_0 = x + (y + 1.0);
          	tmp = 0.0;
          	if (y <= 5.5e-106)
          		tmp = (y / (y + x)) / t_0;
          	elseif (y <= 6.5e+19)
          		tmp = (x / y) / t_0;
          	else
          		tmp = x / ((y + x) * (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[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.5e-106], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 6.5e+19], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision], N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
          
          \begin{array}{l}
          [x, y] = \mathsf{sort}([x, y])\\
          \\
          \begin{array}{l}
          t_0 := x + \left(y + 1\right)\\
          \mathbf{if}\;y \leq 5.5 \cdot 10^{-106}:\\
          \;\;\;\;\frac{\frac{y}{y + x}}{t\_0}\\
          
          \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\
          \;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y < 5.5000000000000001e-106

            1. Initial program 69.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. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
              3. associate-*l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
              7. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
              8. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
              9. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
              10. +-lowering-+.f6469.4%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
            3. Simplified69.4%

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

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

                \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
              4. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              6. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              7. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              8. un-div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              9. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              10. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              11. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              12. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
              14. +-lowering-+.f6499.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
            6. Applied egg-rr99.8%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{y}, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
            8. Step-by-step derivation
              1. Simplified63.9%

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

              if 5.5000000000000001e-106 < y < 6.5e19

              1. Initial program 88.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. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                3. associate-*l*N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                7. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                8. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                10. +-lowering-+.f6488.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
              3. Simplified88.7%

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

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

                  \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
                3. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
                5. *-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                6. associate-/l*N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                7. clear-numN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                8. un-div-invN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                9. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                10. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                11. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                12. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                13. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
                14. +-lowering-+.f6499.8%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
              6. Applied egg-rr99.8%

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

                \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{y}\right)}, \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
              8. Step-by-step derivation
                1. /-lowering-/.f6448.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\color{blue}{x}, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
              9. Simplified48.0%

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

              if 6.5e19 < y

              1. Initial program 60.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. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                3. associate-*l*N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                7. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                8. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                9. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                10. +-lowering-+.f6460.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
              3. Simplified60.0%

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \color{blue}{y}\right)\right)\right) \]
              6. Step-by-step derivation
                1. Simplified59.4%

                  \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \color{blue}{y}\right)} \]
                2. Step-by-step derivation
                  1. times-fracN/A

                    \[\leadsto \frac{x}{x + y} \cdot \color{blue}{\frac{y}{\left(x + y\right) \cdot y}} \]
                  2. *-commutativeN/A

                    \[\leadsto \frac{x}{x + y} \cdot \frac{y}{y \cdot \color{blue}{\left(x + y\right)}} \]
                  3. associate-/r*N/A

                    \[\leadsto \frac{x}{x + y} \cdot \frac{\frac{y}{y}}{\color{blue}{x + y}} \]
                  4. *-inversesN/A

                    \[\leadsto \frac{x}{x + y} \cdot \frac{1}{\color{blue}{x} + y} \]
                  5. div-invN/A

                    \[\leadsto \frac{\frac{x}{x + y}}{\color{blue}{x + y}} \]
                  6. clear-numN/A

                    \[\leadsto \frac{1}{\color{blue}{\frac{x + y}{\frac{x}{x + y}}}} \]
                  7. un-div-invN/A

                    \[\leadsto \frac{1}{\left(x + y\right) \cdot \color{blue}{\frac{1}{\frac{x}{x + y}}}} \]
                  8. clear-numN/A

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

                    \[\leadsto \frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{\color{blue}{x}}} \]
                  10. clear-numN/A

                    \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
                  11. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)}\right) \]
                  12. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(x + y\right)}\right)\right) \]
                  13. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(y + x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                  14. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                  15. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(y + \color{blue}{x}\right)\right)\right) \]
                  16. +-lowering-+.f6483.5%

                    \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \mathsf{+.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                3. Applied egg-rr83.5%

                  \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \]
              7. Recombined 3 regimes into one program.
              8. Final simplification67.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.5 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \end{array} \]
              9. Add Preprocessing

              Alternative 7: 82.3% accurate, 0.9× speedup?

              \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{x}}{t\_0}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{y}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \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 (+ x (+ y 1.0))))
                 (if (<= y 9.2e-106)
                   (/ (/ y x) t_0)
                   (if (<= y 6.5e+19) (/ (/ x y) t_0) (/ x (* (+ y x) (+ y x)))))))
              assert(x < y);
              double code(double x, double y) {
              	double t_0 = x + (y + 1.0);
              	double tmp;
              	if (y <= 9.2e-106) {
              		tmp = (y / x) / t_0;
              	} else if (y <= 6.5e+19) {
              		tmp = (x / y) / t_0;
              	} else {
              		tmp = x / ((y + x) * (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 = x + (y + 1.0d0)
                  if (y <= 9.2d-106) then
                      tmp = (y / x) / t_0
                  else if (y <= 6.5d+19) then
                      tmp = (x / y) / t_0
                  else
                      tmp = x / ((y + x) * (y + x))
                  end if
                  code = tmp
              end function
              
              assert x < y;
              public static double code(double x, double y) {
              	double t_0 = x + (y + 1.0);
              	double tmp;
              	if (y <= 9.2e-106) {
              		tmp = (y / x) / t_0;
              	} else if (y <= 6.5e+19) {
              		tmp = (x / y) / t_0;
              	} else {
              		tmp = x / ((y + x) * (y + x));
              	}
              	return tmp;
              }
              
              [x, y] = sort([x, y])
              def code(x, y):
              	t_0 = x + (y + 1.0)
              	tmp = 0
              	if y <= 9.2e-106:
              		tmp = (y / x) / t_0
              	elif y <= 6.5e+19:
              		tmp = (x / y) / t_0
              	else:
              		tmp = x / ((y + x) * (y + x))
              	return tmp
              
              x, y = sort([x, y])
              function code(x, y)
              	t_0 = Float64(x + Float64(y + 1.0))
              	tmp = 0.0
              	if (y <= 9.2e-106)
              		tmp = Float64(Float64(y / x) / t_0);
              	elseif (y <= 6.5e+19)
              		tmp = Float64(Float64(x / y) / t_0);
              	else
              		tmp = Float64(x / Float64(Float64(y + x) * Float64(y + x)));
              	end
              	return tmp
              end
              
              x, y = num2cell(sort([x, y])){:}
              function tmp_2 = code(x, y)
              	t_0 = x + (y + 1.0);
              	tmp = 0.0;
              	if (y <= 9.2e-106)
              		tmp = (y / x) / t_0;
              	elseif (y <= 6.5e+19)
              		tmp = (x / y) / t_0;
              	else
              		tmp = x / ((y + x) * (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[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 9.2e-106], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 6.5e+19], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision], N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
              
              \begin{array}{l}
              [x, y] = \mathsf{sort}([x, y])\\
              \\
              \begin{array}{l}
              t_0 := x + \left(y + 1\right)\\
              \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\
              \;\;\;\;\frac{\frac{y}{x}}{t\_0}\\
              
              \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\
              \;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if y < 9.2000000000000004e-106

                1. Initial program 69.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. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                  3. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                  7. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                  8. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                  9. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                  10. +-lowering-+.f6469.4%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                3. Simplified69.4%

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

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

                    \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
                  3. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  6. associate-/l*N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  7. clear-numN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  8. un-div-invN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  9. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  10. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  11. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  12. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  13. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
                  14. +-lowering-+.f6499.8%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                6. Applied egg-rr99.8%

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

                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{x}\right)}, \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                8. Step-by-step derivation
                  1. /-lowering-/.f6463.2%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), \mathsf{+.f64}\left(\color{blue}{x}, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                9. Simplified63.2%

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

                if 9.2000000000000004e-106 < y < 6.5e19

                1. Initial program 88.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. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                  3. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                  7. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                  8. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                  9. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                  10. +-lowering-+.f6488.7%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                3. Simplified88.7%

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

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

                    \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
                  3. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  6. associate-/l*N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  7. clear-numN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  8. un-div-invN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  9. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  10. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  11. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  12. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                  13. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
                  14. +-lowering-+.f6499.8%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                6. Applied egg-rr99.8%

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

                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{y}\right)}, \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                8. Step-by-step derivation
                  1. /-lowering-/.f6448.0%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\color{blue}{x}, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                9. Simplified48.0%

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

                if 6.5e19 < y

                1. Initial program 60.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. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                  3. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                  7. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                  8. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                  9. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                  10. +-lowering-+.f6460.0%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                3. Simplified60.0%

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \color{blue}{y}\right)\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified59.4%

                    \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \color{blue}{y}\right)} \]
                  2. Step-by-step derivation
                    1. times-fracN/A

                      \[\leadsto \frac{x}{x + y} \cdot \color{blue}{\frac{y}{\left(x + y\right) \cdot y}} \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{x}{x + y} \cdot \frac{y}{y \cdot \color{blue}{\left(x + y\right)}} \]
                    3. associate-/r*N/A

                      \[\leadsto \frac{x}{x + y} \cdot \frac{\frac{y}{y}}{\color{blue}{x + y}} \]
                    4. *-inversesN/A

                      \[\leadsto \frac{x}{x + y} \cdot \frac{1}{\color{blue}{x} + y} \]
                    5. div-invN/A

                      \[\leadsto \frac{\frac{x}{x + y}}{\color{blue}{x + y}} \]
                    6. clear-numN/A

                      \[\leadsto \frac{1}{\color{blue}{\frac{x + y}{\frac{x}{x + y}}}} \]
                    7. un-div-invN/A

                      \[\leadsto \frac{1}{\left(x + y\right) \cdot \color{blue}{\frac{1}{\frac{x}{x + y}}}} \]
                    8. clear-numN/A

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

                      \[\leadsto \frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{\color{blue}{x}}} \]
                    10. clear-numN/A

                      \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
                    11. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)}\right) \]
                    12. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(x + y\right)}\right)\right) \]
                    13. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(y + x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                    14. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                    15. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(y + \color{blue}{x}\right)\right)\right) \]
                    16. +-lowering-+.f6483.5%

                      \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \mathsf{+.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                  3. Applied egg-rr83.5%

                    \[\leadsto \color{blue}{\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 8: 82.3% accurate, 0.9× speedup?

                \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\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 9.2e-106)
                   (/ (/ y x) (+ 1.0 x))
                   (if (<= y 6.5e+19) (/ (/ x y) (+ x (+ y 1.0))) (/ x (* (+ y x) (+ y x))))))
                assert(x < y);
                double code(double x, double y) {
                	double tmp;
                	if (y <= 9.2e-106) {
                		tmp = (y / x) / (1.0 + x);
                	} else if (y <= 6.5e+19) {
                		tmp = (x / y) / (x + (y + 1.0));
                	} else {
                		tmp = x / ((y + x) * (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) :: tmp
                    if (y <= 9.2d-106) then
                        tmp = (y / x) / (1.0d0 + x)
                    else if (y <= 6.5d+19) then
                        tmp = (x / y) / (x + (y + 1.0d0))
                    else
                        tmp = x / ((y + x) * (y + x))
                    end if
                    code = tmp
                end function
                
                assert x < y;
                public static double code(double x, double y) {
                	double tmp;
                	if (y <= 9.2e-106) {
                		tmp = (y / x) / (1.0 + x);
                	} else if (y <= 6.5e+19) {
                		tmp = (x / y) / (x + (y + 1.0));
                	} else {
                		tmp = x / ((y + x) * (y + x));
                	}
                	return tmp;
                }
                
                [x, y] = sort([x, y])
                def code(x, y):
                	tmp = 0
                	if y <= 9.2e-106:
                		tmp = (y / x) / (1.0 + x)
                	elif y <= 6.5e+19:
                		tmp = (x / y) / (x + (y + 1.0))
                	else:
                		tmp = x / ((y + x) * (y + x))
                	return tmp
                
                x, y = sort([x, y])
                function code(x, y)
                	tmp = 0.0
                	if (y <= 9.2e-106)
                		tmp = Float64(Float64(y / x) / Float64(1.0 + x));
                	elseif (y <= 6.5e+19)
                		tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0)));
                	else
                		tmp = Float64(x / Float64(Float64(y + x) * Float64(y + x)));
                	end
                	return tmp
                end
                
                x, y = num2cell(sort([x, y])){:}
                function tmp_2 = code(x, y)
                	tmp = 0.0;
                	if (y <= 9.2e-106)
                		tmp = (y / x) / (1.0 + x);
                	elseif (y <= 6.5e+19)
                		tmp = (x / y) / (x + (y + 1.0));
                	else
                		tmp = x / ((y + x) * (y + x));
                	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, 9.2e-106], N[(N[(y / x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+19], N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                [x, y] = \mathsf{sort}([x, y])\\
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\
                \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
                
                \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\
                \;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if y < 9.2000000000000004e-106

                  1. Initial program 69.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. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                    7. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                    8. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                    9. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                    10. +-lowering-+.f6469.4%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                  3. Simplified69.4%

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

                    \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                    3. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                    4. +-lowering-+.f6463.0%

                      \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                  7. Simplified63.0%

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

                      \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(\frac{y}{x}\right), \color{blue}{\left(x + 1\right)}\right) \]
                    3. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\color{blue}{x} + 1\right)\right) \]
                    4. +-lowering-+.f6463.1%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
                  9. Applied egg-rr63.1%

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

                  if 9.2000000000000004e-106 < y < 6.5e19

                  1. Initial program 88.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. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                    7. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                    8. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                    9. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                    10. +-lowering-+.f6488.7%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                  3. Simplified88.7%

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

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

                      \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
                    3. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
                    4. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    6. associate-/l*N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    7. clear-numN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    8. un-div-invN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    9. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    10. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    11. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    12. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                    13. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
                    14. +-lowering-+.f6499.8%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                  6. Applied egg-rr99.8%

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

                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{y}\right)}, \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                  8. Step-by-step derivation
                    1. /-lowering-/.f6448.0%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\color{blue}{x}, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                  9. Simplified48.0%

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

                  if 6.5e19 < y

                  1. Initial program 60.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. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                    7. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                    8. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                    9. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                    10. +-lowering-+.f6460.0%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                  3. Simplified60.0%

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \color{blue}{y}\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified59.4%

                      \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \color{blue}{y}\right)} \]
                    2. Step-by-step derivation
                      1. times-fracN/A

                        \[\leadsto \frac{x}{x + y} \cdot \color{blue}{\frac{y}{\left(x + y\right) \cdot y}} \]
                      2. *-commutativeN/A

                        \[\leadsto \frac{x}{x + y} \cdot \frac{y}{y \cdot \color{blue}{\left(x + y\right)}} \]
                      3. associate-/r*N/A

                        \[\leadsto \frac{x}{x + y} \cdot \frac{\frac{y}{y}}{\color{blue}{x + y}} \]
                      4. *-inversesN/A

                        \[\leadsto \frac{x}{x + y} \cdot \frac{1}{\color{blue}{x} + y} \]
                      5. div-invN/A

                        \[\leadsto \frac{\frac{x}{x + y}}{\color{blue}{x + y}} \]
                      6. clear-numN/A

                        \[\leadsto \frac{1}{\color{blue}{\frac{x + y}{\frac{x}{x + y}}}} \]
                      7. un-div-invN/A

                        \[\leadsto \frac{1}{\left(x + y\right) \cdot \color{blue}{\frac{1}{\frac{x}{x + y}}}} \]
                      8. clear-numN/A

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

                        \[\leadsto \frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{\color{blue}{x}}} \]
                      10. clear-numN/A

                        \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
                      11. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)}\right) \]
                      12. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(x + y\right)}\right)\right) \]
                      13. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(y + x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                      14. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                      15. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(y + \color{blue}{x}\right)\right)\right) \]
                      16. +-lowering-+.f6483.5%

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \mathsf{+.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                    3. Applied egg-rr83.5%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 9: 82.2% accurate, 0.9× speedup?

                  \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\ \mathbf{elif}\;y \leq 5500000:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\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 9.2e-106)
                     (/ (/ y x) (+ 1.0 x))
                     (if (<= y 5500000.0) (/ x (* y (+ y 1.0))) (/ x (* (+ y x) (+ y x))))))
                  assert(x < y);
                  double code(double x, double y) {
                  	double tmp;
                  	if (y <= 9.2e-106) {
                  		tmp = (y / x) / (1.0 + x);
                  	} else if (y <= 5500000.0) {
                  		tmp = x / (y * (y + 1.0));
                  	} else {
                  		tmp = x / ((y + x) * (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) :: tmp
                      if (y <= 9.2d-106) then
                          tmp = (y / x) / (1.0d0 + x)
                      else if (y <= 5500000.0d0) then
                          tmp = x / (y * (y + 1.0d0))
                      else
                          tmp = x / ((y + x) * (y + x))
                      end if
                      code = tmp
                  end function
                  
                  assert x < y;
                  public static double code(double x, double y) {
                  	double tmp;
                  	if (y <= 9.2e-106) {
                  		tmp = (y / x) / (1.0 + x);
                  	} else if (y <= 5500000.0) {
                  		tmp = x / (y * (y + 1.0));
                  	} else {
                  		tmp = x / ((y + x) * (y + x));
                  	}
                  	return tmp;
                  }
                  
                  [x, y] = sort([x, y])
                  def code(x, y):
                  	tmp = 0
                  	if y <= 9.2e-106:
                  		tmp = (y / x) / (1.0 + x)
                  	elif y <= 5500000.0:
                  		tmp = x / (y * (y + 1.0))
                  	else:
                  		tmp = x / ((y + x) * (y + x))
                  	return tmp
                  
                  x, y = sort([x, y])
                  function code(x, y)
                  	tmp = 0.0
                  	if (y <= 9.2e-106)
                  		tmp = Float64(Float64(y / x) / Float64(1.0 + x));
                  	elseif (y <= 5500000.0)
                  		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
                  	else
                  		tmp = Float64(x / Float64(Float64(y + x) * Float64(y + x)));
                  	end
                  	return tmp
                  end
                  
                  x, y = num2cell(sort([x, y])){:}
                  function tmp_2 = code(x, y)
                  	tmp = 0.0;
                  	if (y <= 9.2e-106)
                  		tmp = (y / x) / (1.0 + x);
                  	elseif (y <= 5500000.0)
                  		tmp = x / (y * (y + 1.0));
                  	else
                  		tmp = x / ((y + x) * (y + x));
                  	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, 9.2e-106], N[(N[(y / x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5500000.0], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [x, y] = \mathsf{sort}([x, y])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\
                  \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
                  
                  \mathbf{elif}\;y \leq 5500000:\\
                  \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if y < 9.2000000000000004e-106

                    1. Initial program 69.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. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                      3. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                      7. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                      8. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                      9. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                      10. +-lowering-+.f6469.4%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                    3. Simplified69.4%

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

                      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                      3. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                      4. +-lowering-+.f6463.0%

                        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                    7. Simplified63.0%

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

                        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
                      2. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y}{x}\right), \color{blue}{\left(x + 1\right)}\right) \]
                      3. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\color{blue}{x} + 1\right)\right) \]
                      4. +-lowering-+.f6463.1%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
                    9. Applied egg-rr63.1%

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

                    if 9.2000000000000004e-106 < y < 5.5e6

                    1. Initial program 88.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. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                      3. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                      7. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                      8. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                      9. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                      10. +-lowering-+.f6488.2%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                    3. Simplified88.2%

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

                      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(1 + y\right)\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(1 + y\right)}\right)\right) \]
                      3. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \left(y + \color{blue}{1}\right)\right)\right) \]
                      4. +-lowering-+.f6449.4%

                        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                    7. Simplified49.4%

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

                    if 5.5e6 < y

                    1. Initial program 60.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. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                      3. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                      7. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                      8. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                      9. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                      10. +-lowering-+.f6460.6%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                    3. Simplified60.6%

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

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \color{blue}{y}\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. Simplified58.6%

                        \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \color{blue}{y}\right)} \]
                      2. Step-by-step derivation
                        1. times-fracN/A

                          \[\leadsto \frac{x}{x + y} \cdot \color{blue}{\frac{y}{\left(x + y\right) \cdot y}} \]
                        2. *-commutativeN/A

                          \[\leadsto \frac{x}{x + y} \cdot \frac{y}{y \cdot \color{blue}{\left(x + y\right)}} \]
                        3. associate-/r*N/A

                          \[\leadsto \frac{x}{x + y} \cdot \frac{\frac{y}{y}}{\color{blue}{x + y}} \]
                        4. *-inversesN/A

                          \[\leadsto \frac{x}{x + y} \cdot \frac{1}{\color{blue}{x} + y} \]
                        5. div-invN/A

                          \[\leadsto \frac{\frac{x}{x + y}}{\color{blue}{x + y}} \]
                        6. clear-numN/A

                          \[\leadsto \frac{1}{\color{blue}{\frac{x + y}{\frac{x}{x + y}}}} \]
                        7. un-div-invN/A

                          \[\leadsto \frac{1}{\left(x + y\right) \cdot \color{blue}{\frac{1}{\frac{x}{x + y}}}} \]
                        8. clear-numN/A

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

                          \[\leadsto \frac{1}{\frac{\left(x + y\right) \cdot \left(x + y\right)}{\color{blue}{x}}} \]
                        10. clear-numN/A

                          \[\leadsto \frac{x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right)}} \]
                        11. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)}\right) \]
                        12. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(x + y\right)}\right)\right) \]
                        13. +-commutativeN/A

                          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(y + x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                        14. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(\color{blue}{x} + y\right)\right)\right) \]
                        15. +-commutativeN/A

                          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \left(y + \color{blue}{x}\right)\right)\right) \]
                        16. +-lowering-+.f6482.3%

                          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, x\right), \mathsf{+.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                      3. Applied egg-rr82.3%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\ \mathbf{elif}\;y \leq 5500000:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 10: 84.8% accurate, 0.9× speedup?

                    \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 3 \cdot 10^{-145}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{1}{y + x}}{y + \left(1 + x\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 3e-145)
                       (/ (/ y (+ y x)) (+ x (+ y 1.0)))
                       (* x (/ (/ 1.0 (+ y x)) (+ y (+ 1.0 x))))))
                    assert(x < y);
                    double code(double x, double y) {
                    	double tmp;
                    	if (y <= 3e-145) {
                    		tmp = (y / (y + x)) / (x + (y + 1.0));
                    	} else {
                    		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + 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) :: tmp
                        if (y <= 3d-145) then
                            tmp = (y / (y + x)) / (x + (y + 1.0d0))
                        else
                            tmp = x * ((1.0d0 / (y + x)) / (y + (1.0d0 + x)))
                        end if
                        code = tmp
                    end function
                    
                    assert x < y;
                    public static double code(double x, double y) {
                    	double tmp;
                    	if (y <= 3e-145) {
                    		tmp = (y / (y + x)) / (x + (y + 1.0));
                    	} else {
                    		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + x)));
                    	}
                    	return tmp;
                    }
                    
                    [x, y] = sort([x, y])
                    def code(x, y):
                    	tmp = 0
                    	if y <= 3e-145:
                    		tmp = (y / (y + x)) / (x + (y + 1.0))
                    	else:
                    		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + x)))
                    	return tmp
                    
                    x, y = sort([x, y])
                    function code(x, y)
                    	tmp = 0.0
                    	if (y <= 3e-145)
                    		tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + Float64(y + 1.0)));
                    	else
                    		tmp = Float64(x * Float64(Float64(1.0 / Float64(y + x)) / Float64(y + Float64(1.0 + x))));
                    	end
                    	return tmp
                    end
                    
                    x, y = num2cell(sort([x, y])){:}
                    function tmp_2 = code(x, y)
                    	tmp = 0.0;
                    	if (y <= 3e-145)
                    		tmp = (y / (y + x)) / (x + (y + 1.0));
                    	else
                    		tmp = x * ((1.0 / (y + x)) / (y + (1.0 + x)));
                    	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, 3e-145], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    [x, y] = \mathsf{sort}([x, y])\\
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;y \leq 3 \cdot 10^{-145}:\\
                    \;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x \cdot \frac{\frac{1}{y + x}}{y + \left(1 + x\right)}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if y < 2.99999999999999992e-145

                      1. Initial program 68.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. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                        2. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                        3. associate-*l*N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                        4. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                        5. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                        6. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                        7. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                        8. associate-+l+N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                        9. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                        10. +-lowering-+.f6468.6%

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                      3. Simplified68.6%

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

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

                          \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
                        3. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
                        4. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
                        5. *-commutativeN/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        6. associate-/l*N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        7. clear-numN/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        8. un-div-invN/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        9. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        10. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        11. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        12. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                        13. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
                        14. +-lowering-+.f6499.8%

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                      6. Applied egg-rr99.8%

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{y}, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                      8. Step-by-step derivation
                        1. Simplified62.8%

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

                        if 2.99999999999999992e-145 < y

                        1. Initial program 69.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. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                          3. associate-*l*N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          5. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                          6. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                          7. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                          8. associate-+l+N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          9. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          10. +-lowering-+.f6469.1%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                        3. Simplified69.1%

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

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

                            \[\leadsto \frac{\frac{\frac{x \cdot y}{x + y}}{x + y}}{\color{blue}{x + \left(y + 1\right)}} \]
                          3. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{x \cdot y}{x + y}}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right) \]
                          4. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{x \cdot y}{x + y}\right), \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right) \]
                          5. *-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y \cdot x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          6. associate-/l*N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{x}{x + y}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          7. clear-numN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y \cdot \frac{1}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          8. un-div-invN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{y}{\frac{x + y}{x}}\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          9. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{x + y}{x}\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          10. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(x + y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          11. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          12. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right) \]
                          13. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, y\right), x\right)\right), \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right) \]
                          14. +-lowering-+.f6499.9%

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

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

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{x}, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right) \]
                        8. Step-by-step derivation
                          1. Simplified64.4%

                            \[\leadsto \frac{\frac{\color{blue}{x}}{x + y}}{x + \left(y + 1\right)} \]
                          2. Step-by-step derivation
                            1. div-invN/A

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

                              \[\leadsto x \cdot \color{blue}{\frac{\frac{1}{x + y}}{x + \left(y + 1\right)}} \]
                            3. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{\frac{1}{x + y}}{x + \left(y + 1\right)}\right)}\right) \]
                            4. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(\frac{1}{x + y}\right), \color{blue}{\left(x + \left(y + 1\right)\right)}\right)\right) \]
                            5. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(x + y\right)\right), \left(\color{blue}{x} + \left(y + 1\right)\right)\right)\right) \]
                            6. +-commutativeN/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y + x\right)\right), \left(x + \left(y + 1\right)\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(x + \left(y + 1\right)\right)\right)\right) \]
                            8. associate-+r+N/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(\left(x + y\right) + \color{blue}{1}\right)\right)\right) \]
                            9. +-commutativeN/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(\left(y + x\right) + 1\right)\right)\right) \]
                            10. associate-+l+N/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \left(y + \color{blue}{\left(x + 1\right)}\right)\right)\right) \]
                            11. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(y, \color{blue}{\left(x + 1\right)}\right)\right)\right) \]
                            12. +-lowering-+.f6480.0%

                              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(y, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right)\right) \]
                          3. Applied egg-rr80.0%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 3 \cdot 10^{-145}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{1}{y + x}}{y + \left(1 + x\right)}\\ \end{array} \]
                        11. Add Preprocessing

                        Alternative 11: 79.8% accurate, 1.0× 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.6 \cdot 10^{-102}:\\ \;\;\;\;\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 (<= x -4.6e-102) (/ 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 <= -4.6e-102) {
                        		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 <= (-4.6d-102)) 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 <= -4.6e-102) {
                        		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 <= -4.6e-102:
                        		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 <= -4.6e-102)
                        		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 <= -4.6e-102)
                        		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[LessEqual[x, -4.6e-102], 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 -4.6 \cdot 10^{-102}:\\
                        \;\;\;\;\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 60.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6460.9%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified60.9%

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

                            \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                          6. Step-by-step derivation
                            1. unpow2N/A

                              \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                            2. associate-/r*N/A

                              \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
                            3. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(\frac{y}{x}\right), \color{blue}{x}\right) \]
                            4. /-lowering-/.f6479.4%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), x\right) \]
                          7. Simplified79.4%

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

                          if -1 < x < -4.59999999999999973e-102

                          1. Initial program 81.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6481.5%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified81.5%

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

                            \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6439.3%

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified39.3%

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

                            \[\leadsto \color{blue}{\frac{y}{x}} \]
                          9. Step-by-step derivation
                            1. /-lowering-/.f6439.3%

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{x}\right) \]
                          10. Simplified39.3%

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

                          if -4.59999999999999973e-102 < x

                          1. Initial program 71.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6471.4%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified71.4%

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

                            \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(1 + y\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(1 + y\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \left(y + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6463.0%

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified63.0%

                            \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
                        3. Recombined 3 regimes into one program.
                        4. Add Preprocessing

                        Alternative 12: 99.8% accurate, 1.0× speedup?

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

                            \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                          3. associate-*l*N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          5. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                          6. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                          7. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                          8. associate-+l+N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          9. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          10. +-lowering-+.f6468.8%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                        3. Simplified68.8%

                          \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)\right)}} \]
                        4. Add Preprocessing
                        5. Step-by-step derivation
                          1. times-fracN/A

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

                            \[\leadsto \frac{\frac{x}{x + y} \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
                          3. *-commutativeN/A

                            \[\leadsto \frac{\frac{x}{x + y} \cdot y}{\left(x + \left(y + 1\right)\right) \cdot \color{blue}{\left(x + y\right)}} \]
                          4. times-fracN/A

                            \[\leadsto \frac{\frac{x}{x + y}}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{y}{x + y}} \]
                          5. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{x}{x + y}}{x + \left(y + 1\right)}\right), \color{blue}{\left(\frac{y}{x + y}\right)}\right) \]
                          6. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{x}{x + y}\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{\color{blue}{y}}{x + y}\right)\right) \]
                          7. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                          8. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                          9. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \left(y + 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                          10. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                          11. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \color{blue}{\left(x + y\right)}\right)\right) \]
                          12. +-lowering-+.f6499.9%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
                        6. Applied egg-rr99.9%

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

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

                        Alternative 13: 69.3% accurate, 1.1× 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.9 \cdot 10^{-219}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{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.9e-219) (/ y x) (/ (/ x y) y))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (x <= -1.0) {
                        		tmp = (y / x) / x;
                        	} else if (x <= -4.9e-219) {
                        		tmp = y / x;
                        	} else {
                        		tmp = (x / y) / 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.9d-219)) then
                                tmp = y / x
                            else
                                tmp = (x / y) / 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.9e-219) {
                        		tmp = y / x;
                        	} else {
                        		tmp = (x / y) / 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.9e-219:
                        		tmp = y / x
                        	else:
                        		tmp = (x / y) / 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.9e-219)
                        		tmp = Float64(y / x);
                        	else
                        		tmp = Float64(Float64(x / y) / 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.9e-219)
                        		tmp = y / x;
                        	else
                        		tmp = (x / y) / 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.9e-219], N[(y / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / 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.9 \cdot 10^{-219}:\\
                        \;\;\;\;\frac{y}{x}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\frac{x}{y}}{y}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < -1

                          1. Initial program 60.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6460.9%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified60.9%

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

                            \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                          6. Step-by-step derivation
                            1. unpow2N/A

                              \[\leadsto \frac{y}{x \cdot \color{blue}{x}} \]
                            2. associate-/r*N/A

                              \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x}} \]
                            3. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(\frac{y}{x}\right), \color{blue}{x}\right) \]
                            4. /-lowering-/.f6479.4%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), x\right) \]
                          7. Simplified79.4%

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

                          if -1 < x < -4.8999999999999999e-219

                          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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6472.1%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified72.1%

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

                            \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6430.7%

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified30.7%

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

                            \[\leadsto \color{blue}{\frac{y}{x}} \]
                          9. Step-by-step derivation
                            1. /-lowering-/.f6430.7%

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{x}\right) \]
                          10. Simplified30.7%

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

                          if -4.8999999999999999e-219 < x

                          1. Initial program 72.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6472.4%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified72.4%

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

                            \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({y}^{2}\right)}\right) \]
                            2. unpow2N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \left(y \cdot \color{blue}{y}\right)\right) \]
                            3. *-lowering-*.f6444.8%

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right) \]
                          7. Simplified44.8%

                            \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
                          8. Step-by-step derivation
                            1. associate-/r*N/A

                              \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y}} \]
                            2. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y}\right), \color{blue}{y}\right) \]
                            3. /-lowering-/.f6444.8%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), y\right) \]
                          9. Applied egg-rr44.8%

                            \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
                        3. Recombined 3 regimes into one program.
                        4. Add Preprocessing

                        Alternative 14: 80.4% accurate, 1.4× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{x}}{1 + 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 (<= y 9.2e-106) (/ (/ y x) (+ 1.0 x)) (/ x (* y (+ y 1.0)))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (y <= 9.2e-106) {
                        		tmp = (y / x) / (1.0 + 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 (y <= 9.2d-106) then
                                tmp = (y / x) / (1.0d0 + 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 (y <= 9.2e-106) {
                        		tmp = (y / x) / (1.0 + x);
                        	} else {
                        		tmp = x / (y * (y + 1.0));
                        	}
                        	return tmp;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	tmp = 0
                        	if y <= 9.2e-106:
                        		tmp = (y / x) / (1.0 + x)
                        	else:
                        		tmp = x / (y * (y + 1.0))
                        	return tmp
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (y <= 9.2e-106)
                        		tmp = Float64(Float64(y / x) / Float64(1.0 + 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 (y <= 9.2e-106)
                        		tmp = (y / x) / (1.0 + 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[y, 9.2e-106], N[(N[(y / x), $MachinePrecision] / N[(1.0 + x), $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 9.2 \cdot 10^{-106}:\\
                        \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < 9.2000000000000004e-106

                          1. Initial program 69.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6469.4%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified69.4%

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

                            \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6463.0%

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified63.0%

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

                              \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
                            2. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(\frac{y}{x}\right), \color{blue}{\left(x + 1\right)}\right) \]
                            3. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\color{blue}{x} + 1\right)\right) \]
                            4. +-lowering-+.f6463.1%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
                          9. Applied egg-rr63.1%

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

                          if 9.2000000000000004e-106 < y

                          1. Initial program 67.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6467.7%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified67.7%

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

                            \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(1 + y\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(1 + y\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \left(y + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6467.6%

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified67.6%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{y}{x}}{1 + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \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 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\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 9.2e-106) (/ y (* x (+ 1.0 x))) (/ x (* y (+ y 1.0)))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (y <= 9.2e-106) {
                        		tmp = y / (x * (1.0 + 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 (y <= 9.2d-106) then
                                tmp = y / (x * (1.0d0 + 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 (y <= 9.2e-106) {
                        		tmp = y / (x * (1.0 + x));
                        	} else {
                        		tmp = x / (y * (y + 1.0));
                        	}
                        	return tmp;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	tmp = 0
                        	if y <= 9.2e-106:
                        		tmp = y / (x * (1.0 + x))
                        	else:
                        		tmp = x / (y * (y + 1.0))
                        	return tmp
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (y <= 9.2e-106)
                        		tmp = Float64(y / Float64(x * Float64(1.0 + 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 (y <= 9.2e-106)
                        		tmp = y / (x * (1.0 + 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[y, 9.2e-106], N[(y / N[(x * N[(1.0 + x), $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 9.2 \cdot 10^{-106}:\\
                        \;\;\;\;\frac{y}{x \cdot \left(1 + x\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 < 9.2000000000000004e-106

                          1. Initial program 69.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6469.4%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified69.4%

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

                            \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6463.0%

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified63.0%

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

                          if 9.2000000000000004e-106 < y

                          1. Initial program 67.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6467.7%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified67.7%

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

                            \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(1 + y\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(1 + y\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \left(y + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6467.6%

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified67.6%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 16: 59.7% accurate, 1.7× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 1.2 \cdot 10^{-36}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot 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.2e-36) (/ y x) (/ x (* y y))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (y <= 1.2e-36) {
                        		tmp = y / x;
                        	} else {
                        		tmp = x / (y * 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.2d-36) then
                                tmp = y / x
                            else
                                tmp = x / (y * y)
                            end if
                            code = tmp
                        end function
                        
                        assert x < y;
                        public static double code(double x, double y) {
                        	double tmp;
                        	if (y <= 1.2e-36) {
                        		tmp = y / x;
                        	} else {
                        		tmp = x / (y * y);
                        	}
                        	return tmp;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	tmp = 0
                        	if y <= 1.2e-36:
                        		tmp = y / x
                        	else:
                        		tmp = x / (y * y)
                        	return tmp
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (y <= 1.2e-36)
                        		tmp = Float64(y / x);
                        	else
                        		tmp = Float64(x / Float64(y * y));
                        	end
                        	return tmp
                        end
                        
                        x, y = num2cell(sort([x, y])){:}
                        function tmp_2 = code(x, y)
                        	tmp = 0.0;
                        	if (y <= 1.2e-36)
                        		tmp = y / x;
                        	else
                        		tmp = x / (y * 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.2e-36], N[(y / x), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq 1.2 \cdot 10^{-36}:\\
                        \;\;\;\;\frac{y}{x}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{x}{y \cdot y}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < 1.2e-36

                          1. Initial program 70.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6470.7%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified70.7%

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

                            \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                            3. +-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                            4. +-lowering-+.f6462.3%

                              \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                          7. Simplified62.3%

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

                            \[\leadsto \color{blue}{\frac{y}{x}} \]
                          9. Step-by-step derivation
                            1. /-lowering-/.f6436.9%

                              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{x}\right) \]
                          10. Simplified36.9%

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

                          if 1.2e-36 < y

                          1. Initial program 64.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6464.5%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified64.5%

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

                            \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                          6. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({y}^{2}\right)}\right) \]
                            2. unpow2N/A

                              \[\leadsto \mathsf{/.f64}\left(x, \left(y \cdot \color{blue}{y}\right)\right) \]
                            3. *-lowering-*.f6466.4%

                              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right) \]
                          7. Simplified66.4%

                            \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
                        3. Recombined 2 regimes into one program.
                        4. Add Preprocessing

                        Alternative 17: 25.6% accurate, 5.7× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{y}{x} \end{array} \]
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        (FPCore (x y) :precision binary64 (/ y x))
                        assert(x < y);
                        double code(double x, double y) {
                        	return y / 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 = y / x
                        end function
                        
                        assert x < y;
                        public static double code(double x, double y) {
                        	return y / x;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	return y / x
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	return Float64(y / x)
                        end
                        
                        x, y = num2cell(sort([x, y])){:}
                        function tmp = code(x, y)
                        	tmp = y / x;
                        end
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        code[x_, y_] := N[(y / x), $MachinePrecision]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \frac{y}{x}
                        \end{array}
                        
                        Derivation
                        1. Initial program 68.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. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                          3. associate-*l*N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          5. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                          6. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                          7. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                          8. associate-+l+N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          9. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          10. +-lowering-+.f6468.8%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                        3. Simplified68.8%

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

                          \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
                        6. Step-by-step derivation
                          1. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot \left(1 + x\right)\right)}\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right) \]
                          3. +-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right) \]
                          4. +-lowering-+.f6449.3%

                            \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right) \]
                        7. Simplified49.3%

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

                          \[\leadsto \color{blue}{\frac{y}{x}} \]
                        9. Step-by-step derivation
                          1. /-lowering-/.f6426.1%

                            \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{x}\right) \]
                        10. Simplified26.1%

                          \[\leadsto \color{blue}{\frac{y}{x}} \]
                        11. Add Preprocessing

                        Alternative 18: 4.3% 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.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. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                          3. associate-*l*N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                          5. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                          6. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                          7. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                          8. associate-+l+N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          9. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                          10. +-lowering-+.f6468.8%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                        3. Simplified68.8%

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

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \color{blue}{y}\right)\right)\right) \]
                        6. Step-by-step derivation
                          1. Simplified35.2%

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

                            \[\leadsto \color{blue}{\frac{1}{x}} \]
                          3. Step-by-step derivation
                            1. /-lowering-/.f644.1%

                              \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{x}\right) \]
                          4. Simplified4.1%

                            \[\leadsto \color{blue}{\frac{1}{x}} \]
                          5. Add Preprocessing

                          Alternative 19: 3.7% 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.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. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right) \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\left(x + y\right) \cdot \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}\right)\right) \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} \cdot \left(\left(x + y\right) + 1\right)\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\left(x + y\right), \color{blue}{\left(\left(x + y\right) + 1\right)}\right)\right)\right) \]
                            7. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(\color{blue}{\left(x + y\right)} + 1\right)\right)\right)\right) \]
                            8. associate-+l+N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(x + \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \color{blue}{\left(y + 1\right)}\right)\right)\right)\right) \]
                            10. +-lowering-+.f6468.8%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, \color{blue}{1}\right)\right)\right)\right)\right) \]
                          3. Simplified68.8%

                            \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)\right)}} \]
                          4. Add Preprocessing
                          5. Step-by-step derivation
                            1. times-fracN/A

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

                              \[\leadsto \frac{\frac{x}{x + y} \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
                            3. *-commutativeN/A

                              \[\leadsto \frac{\frac{x}{x + y} \cdot y}{\left(x + \left(y + 1\right)\right) \cdot \color{blue}{\left(x + y\right)}} \]
                            4. times-fracN/A

                              \[\leadsto \frac{\frac{x}{x + y}}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{y}{x + y}} \]
                            5. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{x}{x + y}}{x + \left(y + 1\right)}\right), \color{blue}{\left(\frac{y}{x + y}\right)}\right) \]
                            6. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{x}{x + y}\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{\color{blue}{y}}{x + y}\right)\right) \]
                            7. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(x + y\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                            8. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \left(x + \left(y + 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                            9. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \left(y + 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                            10. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \left(\frac{y}{x + y}\right)\right) \]
                            11. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \color{blue}{\left(x + y\right)}\right)\right) \]
                            12. +-lowering-+.f6499.9%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
                          6. Applied egg-rr99.9%

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(1 + -1 \cdot \frac{y}{x}\right)}, \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, y\right)\right)\right) \]
                          8. Step-by-step derivation
                            1. mul-1-negN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(1 + \left(\mathsf{neg}\left(\frac{y}{x}\right)\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, y\right)\right)\right) \]
                            2. unsub-negN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(1 - \frac{y}{x}\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, y\right)\right)\right) \]
                            3. --lowering--.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{y}{x}\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, y\right)\right)\right) \]
                            4. /-lowering-/.f6451.3%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(x, \mathsf{+.f64}\left(y, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, y\right)\right)\right) \]
                          9. Simplified51.3%

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

                            \[\leadsto \color{blue}{\frac{-1}{x}} \]
                          11. Step-by-step derivation
                            1. /-lowering-/.f644.0%

                              \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{x}\right) \]
                          12. Simplified4.0%

                            \[\leadsto \color{blue}{\frac{-1}{x}} \]
                          13. Add Preprocessing

                          Developer Target 1: 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 2024138 
                          (FPCore (x y)
                            :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
                            :precision binary64
                          
                            :alt
                            (! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))
                          
                            (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))