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

Percentage Accurate: 69.5% → 99.8%
Time: 13.4s
Alternatives: 17
Speedup: 1.1×

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 17 alternatives:

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

Initial Program: 69.5% 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{x}{\left(x + y\right) + 1} \cdot \frac{\frac{y}{x + y}}{x + y} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (* (/ x (+ (+ x y) 1.0)) (/ (/ y (+ x y)) (+ x y))))
assert(x < y);
double code(double x, double y) {
	return (x / ((x + y) + 1.0)) * ((y / (x + y)) / (x + y));
}
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 / ((x + y) + 1.0d0)) * ((y / (x + y)) / (x + y))
end function
assert x < y;
public static double code(double x, double y) {
	return (x / ((x + y) + 1.0)) * ((y / (x + y)) / (x + y));
}
[x, y] = sort([x, y])
def code(x, y):
	return (x / ((x + y) + 1.0)) * ((y / (x + y)) / (x + y))
x, y = sort([x, y])
function code(x, y)
	return Float64(Float64(x / Float64(Float64(x + y) + 1.0)) * Float64(Float64(y / Float64(x + y)) / Float64(x + y)))
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
	tmp = (x / ((x + y) + 1.0)) * ((y / (x + y)) / (x + y));
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := N[(N[(x / N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{x}{\left(x + y\right) + 1} \cdot \frac{\frac{y}{x + y}}{x + y}
\end{array}
Derivation
  1. Initial program 71.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-+.f6471.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. Simplified71.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-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.3% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 6.4 \cdot 10^{-105}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{x}{\left(x + y\right) + \left(x + y\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y 6.4e-105)
   (/ (/ y x) (+ x 1.0))
   (if (<= y 1.8e+159)
     (/ x (+ (+ x y) (* (+ x y) (+ x y))))
     (* (/ (/ y (+ x y)) (+ x y)) (/ x y)))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 6.4e-105) {
		tmp = (y / x) / (x + 1.0);
	} else if (y <= 1.8e+159) {
		tmp = x / ((x + y) + ((x + y) * (x + y)));
	} else {
		tmp = ((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 <= 6.4d-105) then
        tmp = (y / x) / (x + 1.0d0)
    else if (y <= 1.8d+159) then
        tmp = x / ((x + y) + ((x + y) * (x + y)))
    else
        tmp = ((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 <= 6.4e-105) {
		tmp = (y / x) / (x + 1.0);
	} else if (y <= 1.8e+159) {
		tmp = x / ((x + y) + ((x + y) * (x + y)));
	} else {
		tmp = ((y / (x + y)) / (x + y)) * (x / y);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 6.4e-105:
		tmp = (y / x) / (x + 1.0)
	elif y <= 1.8e+159:
		tmp = x / ((x + y) + ((x + y) * (x + y)))
	else:
		tmp = ((y / (x + y)) / (x + y)) * (x / y)
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 6.4e-105)
		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
	elseif (y <= 1.8e+159)
		tmp = Float64(x / Float64(Float64(x + y) + Float64(Float64(x + y) * Float64(x + y))));
	else
		tmp = Float64(Float64(Float64(y / Float64(x + y)) / Float64(x + y)) * Float64(x / y));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 6.4e-105)
		tmp = (y / x) / (x + 1.0);
	elseif (y <= 1.8e+159)
		tmp = x / ((x + y) + ((x + y) * (x + y)));
	else
		tmp = ((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, 6.4e-105], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+159], N[(x / N[(N[(x + y), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.4 \cdot 10^{-105}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\

\mathbf{elif}\;y \leq 1.8 \cdot 10^{+159}:\\
\;\;\;\;\frac{x}{\left(x + y\right) + \left(x + y\right) \cdot \left(x + y\right)}\\

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


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

    1. Initial program 74.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-+.f6474.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. Simplified74.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. associate-/r*N/A

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

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

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

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

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

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

    if 6.39999999999999962e-105 < y < 1.80000000000000018e159

    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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.80000000000000018e159 < y

      1. Initial program 59.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-+.f6459.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. Simplified59.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-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{y}} \cdot \frac{\frac{y}{x + y}}{x + y} \]
    9. Recombined 3 regimes into one program.
    10. Final simplification68.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.4 \cdot 10^{-105}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{x}{\left(x + y\right) + \left(x + y\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y}\\ \end{array} \]
    11. Add Preprocessing

    Alternative 3: 87.3% accurate, 0.7× speedup?

    \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 6.1 \cdot 10^{-105}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y}\\ \end{array} \end{array} \]
    NOTE: x and y should be sorted in increasing order before calling this function.
    (FPCore (x y)
     :precision binary64
     (if (<= y 6.1e-105)
       (/ (/ y x) (+ x 1.0))
       (if (<= y 1.8e+159)
         (/ x (* (+ x y) (+ (+ x y) 1.0)))
         (* (/ (/ y (+ x y)) (+ x y)) (/ x y)))))
    assert(x < y);
    double code(double x, double y) {
    	double tmp;
    	if (y <= 6.1e-105) {
    		tmp = (y / x) / (x + 1.0);
    	} else if (y <= 1.8e+159) {
    		tmp = x / ((x + y) * ((x + y) + 1.0));
    	} else {
    		tmp = ((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 <= 6.1d-105) then
            tmp = (y / x) / (x + 1.0d0)
        else if (y <= 1.8d+159) then
            tmp = x / ((x + y) * ((x + y) + 1.0d0))
        else
            tmp = ((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 <= 6.1e-105) {
    		tmp = (y / x) / (x + 1.0);
    	} else if (y <= 1.8e+159) {
    		tmp = x / ((x + y) * ((x + y) + 1.0));
    	} else {
    		tmp = ((y / (x + y)) / (x + y)) * (x / y);
    	}
    	return tmp;
    }
    
    [x, y] = sort([x, y])
    def code(x, y):
    	tmp = 0
    	if y <= 6.1e-105:
    		tmp = (y / x) / (x + 1.0)
    	elif y <= 1.8e+159:
    		tmp = x / ((x + y) * ((x + y) + 1.0))
    	else:
    		tmp = ((y / (x + y)) / (x + y)) * (x / y)
    	return tmp
    
    x, y = sort([x, y])
    function code(x, y)
    	tmp = 0.0
    	if (y <= 6.1e-105)
    		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
    	elseif (y <= 1.8e+159)
    		tmp = Float64(x / Float64(Float64(x + y) * Float64(Float64(x + y) + 1.0)));
    	else
    		tmp = Float64(Float64(Float64(y / Float64(x + y)) / Float64(x + y)) * Float64(x / y));
    	end
    	return tmp
    end
    
    x, y = num2cell(sort([x, y])){:}
    function tmp_2 = code(x, y)
    	tmp = 0.0;
    	if (y <= 6.1e-105)
    		tmp = (y / x) / (x + 1.0);
    	elseif (y <= 1.8e+159)
    		tmp = x / ((x + y) * ((x + y) + 1.0));
    	else
    		tmp = ((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, 6.1e-105], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+159], N[(x / N[(N[(x + y), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    [x, y] = \mathsf{sort}([x, y])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq 6.1 \cdot 10^{-105}:\\
    \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
    
    \mathbf{elif}\;y \leq 1.8 \cdot 10^{+159}:\\
    \;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < 6.09999999999999985e-105

      1. Initial program 74.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-+.f6474.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. Simplified74.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. associate-/r*N/A

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

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

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

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

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

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

      if 6.09999999999999985e-105 < y < 1.80000000000000018e159

      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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.80000000000000018e159 < y

        1. Initial program 59.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-+.f6459.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. Simplified59.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-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{x}{y}} \cdot \frac{\frac{y}{x + y}}{x + y} \]
      9. Recombined 3 regimes into one program.
      10. Final simplification68.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.1 \cdot 10^{-105}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 4: 83.6% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 4.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+163}:\\ \;\;\;\;\frac{x}{y \cdot \left(x + y\right)}\\ \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 (<= y 4.8e-74)
         (/ (/ y x) (+ x 1.0))
         (if (<= y 5.5e+15)
           (/ x (* y (+ y 1.0)))
           (if (<= y 1.1e+163) (/ x (* y (+ x y))) (/ (/ x y) y)))))
      assert(x < y);
      double code(double x, double y) {
      	double tmp;
      	if (y <= 4.8e-74) {
      		tmp = (y / x) / (x + 1.0);
      	} else if (y <= 5.5e+15) {
      		tmp = x / (y * (y + 1.0));
      	} else if (y <= 1.1e+163) {
      		tmp = x / (y * (x + y));
      	} 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 <= 4.8d-74) then
              tmp = (y / x) / (x + 1.0d0)
          else if (y <= 5.5d+15) then
              tmp = x / (y * (y + 1.0d0))
          else if (y <= 1.1d+163) then
              tmp = x / (y * (x + y))
          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 <= 4.8e-74) {
      		tmp = (y / x) / (x + 1.0);
      	} else if (y <= 5.5e+15) {
      		tmp = x / (y * (y + 1.0));
      	} else if (y <= 1.1e+163) {
      		tmp = x / (y * (x + y));
      	} else {
      		tmp = (x / y) / y;
      	}
      	return tmp;
      }
      
      [x, y] = sort([x, y])
      def code(x, y):
      	tmp = 0
      	if y <= 4.8e-74:
      		tmp = (y / x) / (x + 1.0)
      	elif y <= 5.5e+15:
      		tmp = x / (y * (y + 1.0))
      	elif y <= 1.1e+163:
      		tmp = x / (y * (x + y))
      	else:
      		tmp = (x / y) / y
      	return tmp
      
      x, y = sort([x, y])
      function code(x, y)
      	tmp = 0.0
      	if (y <= 4.8e-74)
      		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
      	elseif (y <= 5.5e+15)
      		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
      	elseif (y <= 1.1e+163)
      		tmp = Float64(x / Float64(y * Float64(x + y)));
      	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 (y <= 4.8e-74)
      		tmp = (y / x) / (x + 1.0);
      	elseif (y <= 5.5e+15)
      		tmp = x / (y * (y + 1.0));
      	elseif (y <= 1.1e+163)
      		tmp = x / (y * (x + y));
      	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, 4.8e-74], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+15], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+163], N[(x / N[(y * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]
      
      \begin{array}{l}
      [x, y] = \mathsf{sort}([x, y])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq 4.8 \cdot 10^{-74}:\\
      \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
      
      \mathbf{elif}\;y \leq 5.5 \cdot 10^{+15}:\\
      \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
      
      \mathbf{elif}\;y \leq 1.1 \cdot 10^{+163}:\\
      \;\;\;\;\frac{x}{y \cdot \left(x + y\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y < 4.7999999999999998e-74

        1. Initial program 75.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-+.f6475.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. Simplified75.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 y around 0

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

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

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

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

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

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

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

        if 4.7999999999999998e-74 < y < 5.5e15

        1. Initial program 85.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-+.f6485.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. Simplified85.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 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-+.f6475.6%

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

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

        if 5.5e15 < y < 1.09999999999999993e163

        1. Initial program 55.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-+.f6455.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. Simplified55.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.09999999999999993e163 < y

            1. Initial program 59.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-+.f6459.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. Simplified59.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 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-*.f6479.4%

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

              \[\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-/.f6489.5%

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

              \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
          6. Recombined 4 regimes into one program.
          7. Final simplification67.2%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+163}:\\ \;\;\;\;\frac{x}{y \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]
          8. Add Preprocessing

          Alternative 5: 82.2% accurate, 0.8× speedup?

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

            1. Initial program 75.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-+.f6475.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. Simplified75.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. 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-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
            8. 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-+.f6457.7%

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

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

            if 4.7000000000000001e-74 < y < 1.25e14

            1. Initial program 85.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-+.f6485.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. Simplified85.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 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-+.f6475.6%

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

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

            if 1.25e14 < y < 2.0000000000000001e161

            1. Initial program 55.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-+.f6455.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. Simplified55.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.0000000000000001e161 < y

                1. Initial program 59.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-+.f6459.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. Simplified59.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 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-*.f6479.4%

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

                  \[\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-/.f6489.5%

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

                  \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
              6. Recombined 4 regimes into one program.
              7. Final simplification66.0%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.7 \cdot 10^{-74}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+14}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{y \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]
              8. Add Preprocessing

              Alternative 6: 86.9% accurate, 0.8× speedup?

              \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \left(x + y\right) + 1\\ \mathbf{if}\;y \leq 4.8 \cdot 10^{-105}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+134}:\\ \;\;\;\;\frac{x}{\left(x + y\right) \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t\_0} \cdot \frac{1}{y}\\ \end{array} \end{array} \]
              NOTE: x and y should be sorted in increasing order before calling this function.
              (FPCore (x y)
               :precision binary64
               (let* ((t_0 (+ (+ x y) 1.0)))
                 (if (<= y 4.8e-105)
                   (/ (/ y x) (+ x 1.0))
                   (if (<= y 2.2e+134) (/ x (* (+ x y) t_0)) (* (/ x t_0) (/ 1.0 y))))))
              assert(x < y);
              double code(double x, double y) {
              	double t_0 = (x + y) + 1.0;
              	double tmp;
              	if (y <= 4.8e-105) {
              		tmp = (y / x) / (x + 1.0);
              	} else if (y <= 2.2e+134) {
              		tmp = x / ((x + y) * t_0);
              	} else {
              		tmp = (x / t_0) * (1.0 / y);
              	}
              	return tmp;
              }
              
              NOTE: x and y should be sorted in increasing order before calling this function.
              real(8) function code(x, y)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8) :: t_0
                  real(8) :: tmp
                  t_0 = (x + y) + 1.0d0
                  if (y <= 4.8d-105) then
                      tmp = (y / x) / (x + 1.0d0)
                  else if (y <= 2.2d+134) then
                      tmp = x / ((x + y) * t_0)
                  else
                      tmp = (x / t_0) * (1.0d0 / y)
                  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 <= 4.8e-105) {
              		tmp = (y / x) / (x + 1.0);
              	} else if (y <= 2.2e+134) {
              		tmp = x / ((x + y) * t_0);
              	} else {
              		tmp = (x / t_0) * (1.0 / y);
              	}
              	return tmp;
              }
              
              [x, y] = sort([x, y])
              def code(x, y):
              	t_0 = (x + y) + 1.0
              	tmp = 0
              	if y <= 4.8e-105:
              		tmp = (y / x) / (x + 1.0)
              	elif y <= 2.2e+134:
              		tmp = x / ((x + y) * t_0)
              	else:
              		tmp = (x / t_0) * (1.0 / y)
              	return tmp
              
              x, y = sort([x, y])
              function code(x, y)
              	t_0 = Float64(Float64(x + y) + 1.0)
              	tmp = 0.0
              	if (y <= 4.8e-105)
              		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
              	elseif (y <= 2.2e+134)
              		tmp = Float64(x / Float64(Float64(x + y) * t_0));
              	else
              		tmp = Float64(Float64(x / t_0) * Float64(1.0 / y));
              	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 <= 4.8e-105)
              		tmp = (y / x) / (x + 1.0);
              	elseif (y <= 2.2e+134)
              		tmp = x / ((x + y) * t_0);
              	else
              		tmp = (x / t_0) * (1.0 / y);
              	end
              	tmp_2 = tmp;
              end
              
              NOTE: x and y should be sorted in increasing order before calling this function.
              code[x_, y_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[y, 4.8e-105], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+134], N[(x / N[(N[(x + y), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / t$95$0), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]]
              
              \begin{array}{l}
              [x, y] = \mathsf{sort}([x, y])\\
              \\
              \begin{array}{l}
              t_0 := \left(x + y\right) + 1\\
              \mathbf{if}\;y \leq 4.8 \cdot 10^{-105}:\\
              \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
              
              \mathbf{elif}\;y \leq 2.2 \cdot 10^{+134}:\\
              \;\;\;\;\frac{x}{\left(x + y\right) \cdot t\_0}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x}{t\_0} \cdot \frac{1}{y}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if y < 4.8000000000000003e-105

                1. Initial program 74.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-+.f6474.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. Simplified74.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. associate-/r*N/A

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

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

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

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

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

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

                if 4.8000000000000003e-105 < y < 2.2e134

                1. Initial program 69.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-+.f6469.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. Simplified69.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.2e134 < y

                  1. Initial program 60.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-+.f6460.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. Simplified60.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-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 7: 83.8% accurate, 0.8× speedup?

                \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 3.9 \cdot 10^{-74}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+134}:\\ \;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(x + y\right) + 1} \cdot \frac{1}{y}\\ \end{array} \end{array} \]
                NOTE: x and y should be sorted in increasing order before calling this function.
                (FPCore (x y)
                 :precision binary64
                 (if (<= y 3.9e-74)
                   (/ (/ y x) (+ x 1.0))
                   (if (<= y 2.2e+134)
                     (/ x (* (+ x y) (+ y 1.0)))
                     (* (/ x (+ (+ x y) 1.0)) (/ 1.0 y)))))
                assert(x < y);
                double code(double x, double y) {
                	double tmp;
                	if (y <= 3.9e-74) {
                		tmp = (y / x) / (x + 1.0);
                	} else if (y <= 2.2e+134) {
                		tmp = x / ((x + y) * (y + 1.0));
                	} else {
                		tmp = (x / ((x + y) + 1.0)) * (1.0 / y);
                	}
                	return tmp;
                }
                
                NOTE: x and y should be sorted in increasing order before calling this function.
                real(8) function code(x, y)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8) :: tmp
                    if (y <= 3.9d-74) then
                        tmp = (y / x) / (x + 1.0d0)
                    else if (y <= 2.2d+134) then
                        tmp = x / ((x + y) * (y + 1.0d0))
                    else
                        tmp = (x / ((x + y) + 1.0d0)) * (1.0d0 / y)
                    end if
                    code = tmp
                end function
                
                assert x < y;
                public static double code(double x, double y) {
                	double tmp;
                	if (y <= 3.9e-74) {
                		tmp = (y / x) / (x + 1.0);
                	} else if (y <= 2.2e+134) {
                		tmp = x / ((x + y) * (y + 1.0));
                	} else {
                		tmp = (x / ((x + y) + 1.0)) * (1.0 / y);
                	}
                	return tmp;
                }
                
                [x, y] = sort([x, y])
                def code(x, y):
                	tmp = 0
                	if y <= 3.9e-74:
                		tmp = (y / x) / (x + 1.0)
                	elif y <= 2.2e+134:
                		tmp = x / ((x + y) * (y + 1.0))
                	else:
                		tmp = (x / ((x + y) + 1.0)) * (1.0 / y)
                	return tmp
                
                x, y = sort([x, y])
                function code(x, y)
                	tmp = 0.0
                	if (y <= 3.9e-74)
                		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
                	elseif (y <= 2.2e+134)
                		tmp = Float64(x / Float64(Float64(x + y) * Float64(y + 1.0)));
                	else
                		tmp = Float64(Float64(x / Float64(Float64(x + y) + 1.0)) * Float64(1.0 / y));
                	end
                	return tmp
                end
                
                x, y = num2cell(sort([x, y])){:}
                function tmp_2 = code(x, y)
                	tmp = 0.0;
                	if (y <= 3.9e-74)
                		tmp = (y / x) / (x + 1.0);
                	elseif (y <= 2.2e+134)
                		tmp = x / ((x + y) * (y + 1.0));
                	else
                		tmp = (x / ((x + y) + 1.0)) * (1.0 / y);
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: x and y should be sorted in increasing order before calling this function.
                code[x_, y_] := If[LessEqual[y, 3.9e-74], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+134], N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                [x, y] = \mathsf{sort}([x, y])\\
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq 3.9 \cdot 10^{-74}:\\
                \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
                
                \mathbf{elif}\;y \leq 2.2 \cdot 10^{+134}:\\
                \;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(y + 1\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{x}{\left(x + y\right) + 1} \cdot \frac{1}{y}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if y < 3.9000000000000001e-74

                  1. Initial program 75.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-+.f6475.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. Simplified75.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 y around 0

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

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

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

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

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

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

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

                  if 3.9000000000000001e-74 < y < 2.2e134

                  1. Initial program 67.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-+.f6467.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. Simplified67.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 2.2e134 < y

                      1. Initial program 60.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-+.f6460.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. Simplified60.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-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 8: 71.2% 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 -2.35 \cdot 10^{-222}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-226}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 1550000:\\ \;\;\;\;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 -2.35e-222)
                         t_0
                         (if (<= y 1.2e-226) (/ y x) (if (<= y 1550000.0) t_0 (/ (/ x y) y))))))
                    assert(x < y);
                    double code(double x, double y) {
                    	double t_0 = y / (x * x);
                    	double tmp;
                    	if (y <= -2.35e-222) {
                    		tmp = t_0;
                    	} else if (y <= 1.2e-226) {
                    		tmp = y / x;
                    	} else if (y <= 1550000.0) {
                    		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 <= (-2.35d-222)) then
                            tmp = t_0
                        else if (y <= 1.2d-226) then
                            tmp = y / x
                        else if (y <= 1550000.0d0) 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 <= -2.35e-222) {
                    		tmp = t_0;
                    	} else if (y <= 1.2e-226) {
                    		tmp = y / x;
                    	} else if (y <= 1550000.0) {
                    		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 <= -2.35e-222:
                    		tmp = t_0
                    	elif y <= 1.2e-226:
                    		tmp = y / x
                    	elif y <= 1550000.0:
                    		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 <= -2.35e-222)
                    		tmp = t_0;
                    	elseif (y <= 1.2e-226)
                    		tmp = Float64(y / x);
                    	elseif (y <= 1550000.0)
                    		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 <= -2.35e-222)
                    		tmp = t_0;
                    	elseif (y <= 1.2e-226)
                    		tmp = y / x;
                    	elseif (y <= 1550000.0)
                    		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, -2.35e-222], t$95$0, If[LessEqual[y, 1.2e-226], N[(y / x), $MachinePrecision], If[LessEqual[y, 1550000.0], 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 -2.35 \cdot 10^{-222}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;y \leq 1.2 \cdot 10^{-226}:\\
                    \;\;\;\;\frac{y}{x}\\
                    
                    \mathbf{elif}\;y \leq 1550000:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\frac{x}{y}}{y}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if y < -2.3499999999999999e-222 or 1.2e-226 < y < 1.55e6

                      1. Initial program 79.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-+.f6479.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. Simplified79.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. /-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-*.f6435.4%

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

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

                      if -2.3499999999999999e-222 < y < 1.2e-226

                      1. Initial program 60.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-+.f6460.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. Simplified60.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 y around 0

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

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

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

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

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

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

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

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

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

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

                      if 1.55e6 < y

                      1. Initial program 58.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-+.f6458.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. Simplified58.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 \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-*.f6472.4%

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

                        \[\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-/.f6475.3%

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

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

                    Alternative 9: 69.1% 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 -2.35 \cdot 10^{-222}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-226}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 3500000:\\ \;\;\;\;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 -2.35e-222)
                         t_0
                         (if (<= y 1.2e-226) (/ y x) (if (<= y 3500000.0) t_0 (/ x (* y y)))))))
                    assert(x < y);
                    double code(double x, double y) {
                    	double t_0 = y / (x * x);
                    	double tmp;
                    	if (y <= -2.35e-222) {
                    		tmp = t_0;
                    	} else if (y <= 1.2e-226) {
                    		tmp = y / x;
                    	} else if (y <= 3500000.0) {
                    		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 <= (-2.35d-222)) then
                            tmp = t_0
                        else if (y <= 1.2d-226) then
                            tmp = y / x
                        else if (y <= 3500000.0d0) 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 <= -2.35e-222) {
                    		tmp = t_0;
                    	} else if (y <= 1.2e-226) {
                    		tmp = y / x;
                    	} else if (y <= 3500000.0) {
                    		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 <= -2.35e-222:
                    		tmp = t_0
                    	elif y <= 1.2e-226:
                    		tmp = y / x
                    	elif y <= 3500000.0:
                    		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 <= -2.35e-222)
                    		tmp = t_0;
                    	elseif (y <= 1.2e-226)
                    		tmp = Float64(y / x);
                    	elseif (y <= 3500000.0)
                    		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 <= -2.35e-222)
                    		tmp = t_0;
                    	elseif (y <= 1.2e-226)
                    		tmp = y / x;
                    	elseif (y <= 3500000.0)
                    		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, -2.35e-222], t$95$0, If[LessEqual[y, 1.2e-226], N[(y / x), $MachinePrecision], If[LessEqual[y, 3500000.0], 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 -2.35 \cdot 10^{-222}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;y \leq 1.2 \cdot 10^{-226}:\\
                    \;\;\;\;\frac{y}{x}\\
                    
                    \mathbf{elif}\;y \leq 3500000:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{x}{y \cdot y}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if y < -2.3499999999999999e-222 or 1.2e-226 < y < 3.5e6

                      1. Initial program 79.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-+.f6479.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. Simplified79.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. /-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-*.f6435.4%

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

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

                      if -2.3499999999999999e-222 < y < 1.2e-226

                      1. Initial program 60.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-+.f6460.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. Simplified60.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 y around 0

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

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

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

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

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

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

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

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

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

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

                      if 3.5e6 < y

                      1. Initial program 58.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-+.f6458.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. Simplified58.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 \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-*.f6472.4%

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

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

                    Alternative 10: 92.2% accurate, 0.8× speedup?

                    \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -520000000:\\ \;\;\;\;\frac{\frac{1}{\frac{x}{y}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y + 1}\\ \end{array} \end{array} \]
                    NOTE: x and y should be sorted in increasing order before calling this function.
                    (FPCore (x y)
                     :precision binary64
                     (if (<= x -520000000.0)
                       (/ (/ 1.0 (/ x y)) (+ x 1.0))
                       (* (/ (/ y (+ x y)) (+ x y)) (/ x (+ y 1.0)))))
                    assert(x < y);
                    double code(double x, double y) {
                    	double tmp;
                    	if (x <= -520000000.0) {
                    		tmp = (1.0 / (x / y)) / (x + 1.0);
                    	} else {
                    		tmp = ((y / (x + 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 <= (-520000000.0d0)) then
                            tmp = (1.0d0 / (x / y)) / (x + 1.0d0)
                        else
                            tmp = ((y / (x + 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 <= -520000000.0) {
                    		tmp = (1.0 / (x / y)) / (x + 1.0);
                    	} else {
                    		tmp = ((y / (x + y)) / (x + y)) * (x / (y + 1.0));
                    	}
                    	return tmp;
                    }
                    
                    [x, y] = sort([x, y])
                    def code(x, y):
                    	tmp = 0
                    	if x <= -520000000.0:
                    		tmp = (1.0 / (x / y)) / (x + 1.0)
                    	else:
                    		tmp = ((y / (x + y)) / (x + y)) * (x / (y + 1.0))
                    	return tmp
                    
                    x, y = sort([x, y])
                    function code(x, y)
                    	tmp = 0.0
                    	if (x <= -520000000.0)
                    		tmp = Float64(Float64(1.0 / Float64(x / y)) / Float64(x + 1.0));
                    	else
                    		tmp = Float64(Float64(Float64(y / Float64(x + y)) / Float64(x + y)) * Float64(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 <= -520000000.0)
                    		tmp = (1.0 / (x / y)) / (x + 1.0);
                    	else
                    		tmp = ((y / (x + 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, -520000000.0], N[(N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    [x, y] = \mathsf{sort}([x, y])\\
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq -520000000:\\
                    \;\;\;\;\frac{\frac{1}{\frac{x}{y}}}{x + 1}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y + 1}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -5.2e8

                      1. Initial program 64.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-+.f6464.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. Simplified64.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 y around 0

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]
                      8. Step-by-step derivation
                        1. clear-numN/A

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

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

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

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

                      if -5.2e8 < x

                      1. Initial program 73.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-+.f6473.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. Simplified73.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-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{x}{y + 1}} \cdot \frac{\frac{y}{x + y}}{x + y} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification86.8%

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

                    Alternative 11: 83.8% accurate, 0.9× speedup?

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

                      1. Initial program 75.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-+.f6475.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. Simplified75.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 y around 0

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

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

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

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

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

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

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

                      if 3.50000000000000015e-74 < y < 5.80000000000000029e159

                      1. Initial program 66.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-+.f6466.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. Simplified66.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 5.80000000000000029e159 < y

                          1. Initial program 59.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-+.f6459.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. Simplified59.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 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-*.f6479.4%

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

                            \[\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-/.f6489.5%

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

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

                        Alternative 12: 80.4% 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 -1.6 \cdot 10^{-91}:\\ \;\;\;\;\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 -1.6e-91) (/ y x) (/ x (* y (+ y 1.0))))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (x <= -1.0) {
                        		tmp = (y / x) / x;
                        	} else if (x <= -1.6e-91) {
                        		tmp = y / x;
                        	} else {
                        		tmp = x / (y * (y + 1.0));
                        	}
                        	return tmp;
                        }
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        real(8) function code(x, y)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8) :: tmp
                            if (x <= (-1.0d0)) then
                                tmp = (y / x) / x
                            else if (x <= (-1.6d-91)) then
                                tmp = y / x
                            else
                                tmp = x / (y * (y + 1.0d0))
                            end if
                            code = tmp
                        end function
                        
                        assert x < y;
                        public static double code(double x, double y) {
                        	double tmp;
                        	if (x <= -1.0) {
                        		tmp = (y / x) / x;
                        	} else if (x <= -1.6e-91) {
                        		tmp = y / x;
                        	} else {
                        		tmp = x / (y * (y + 1.0));
                        	}
                        	return tmp;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	tmp = 0
                        	if x <= -1.0:
                        		tmp = (y / x) / x
                        	elif x <= -1.6e-91:
                        		tmp = y / x
                        	else:
                        		tmp = x / (y * (y + 1.0))
                        	return tmp
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (x <= -1.0)
                        		tmp = Float64(Float64(y / x) / x);
                        	elseif (x <= -1.6e-91)
                        		tmp = Float64(y / x);
                        	else
                        		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
                        	end
                        	return tmp
                        end
                        
                        x, y = num2cell(sort([x, y])){:}
                        function tmp_2 = code(x, y)
                        	tmp = 0.0;
                        	if (x <= -1.0)
                        		tmp = (y / x) / x;
                        	elseif (x <= -1.6e-91)
                        		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, -1.6e-91], N[(y / x), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq -1:\\
                        \;\;\;\;\frac{\frac{y}{x}}{x}\\
                        
                        \mathbf{elif}\;x \leq -1.6 \cdot 10^{-91}:\\
                        \;\;\;\;\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 63.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-+.f6463.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. Simplified63.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 x around inf

                            \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                          6. 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-*.f6476.8%

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

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

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

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

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

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

                          if -1 < x < -1.59999999999999998e-91

                          1. Initial program 81.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-+.f6481.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. Simplified81.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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

                          if -1.59999999999999998e-91 < x

                          1. Initial program 73.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-+.f6473.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. Simplified73.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-+.f6461.0%

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

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

                        Alternative 13: 70.5% 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.5 \cdot 10^{-92}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\ \end{array} \end{array} \]
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        (FPCore (x y)
                         :precision binary64
                         (if (<= x -1.0)
                           (/ (/ y x) x)
                           (if (<= x -4.5e-92) (/ y x) (* (/ x y) (/ 1.0 y)))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (x <= -1.0) {
                        		tmp = (y / x) / x;
                        	} else if (x <= -4.5e-92) {
                        		tmp = y / x;
                        	} else {
                        		tmp = (x / y) * (1.0 / y);
                        	}
                        	return tmp;
                        }
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        real(8) function code(x, y)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8) :: tmp
                            if (x <= (-1.0d0)) then
                                tmp = (y / x) / x
                            else if (x <= (-4.5d-92)) then
                                tmp = y / x
                            else
                                tmp = (x / y) * (1.0d0 / y)
                            end if
                            code = tmp
                        end function
                        
                        assert x < y;
                        public static double code(double x, double y) {
                        	double tmp;
                        	if (x <= -1.0) {
                        		tmp = (y / x) / x;
                        	} else if (x <= -4.5e-92) {
                        		tmp = y / x;
                        	} else {
                        		tmp = (x / y) * (1.0 / 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.5e-92:
                        		tmp = y / x
                        	else:
                        		tmp = (x / y) * (1.0 / 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.5e-92)
                        		tmp = Float64(y / x);
                        	else
                        		tmp = Float64(Float64(x / y) * Float64(1.0 / 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.5e-92)
                        		tmp = y / x;
                        	else
                        		tmp = (x / y) * (1.0 / y);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -4.5e-92], N[(y / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $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.5 \cdot 10^{-92}:\\
                        \;\;\;\;\frac{y}{x}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < -1

                          1. Initial program 63.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-+.f6463.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. Simplified63.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 x around inf

                            \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                          6. 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-*.f6476.8%

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

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

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

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

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

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

                          if -1 < x < -4.5e-92

                          1. Initial program 81.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-+.f6481.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. Simplified81.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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

                          if -4.5e-92 < x

                          1. Initial program 73.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-+.f6473.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. Simplified73.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-*.f6445.1%

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

                            \[\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. div-invN/A

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

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

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

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

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

                        Alternative 14: 70.6% 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 -1.22 \cdot 10^{-91}:\\ \;\;\;\;\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 -1.22e-91) (/ 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 <= -1.22e-91) {
                        		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 <= (-1.22d-91)) 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 <= -1.22e-91) {
                        		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 <= -1.22e-91:
                        		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 <= -1.22e-91)
                        		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 <= -1.22e-91)
                        		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, -1.22e-91], 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 -1.22 \cdot 10^{-91}:\\
                        \;\;\;\;\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 63.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-+.f6463.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. Simplified63.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 x around inf

                            \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                          6. 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-*.f6476.8%

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

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

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

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

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

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

                          if -1 < x < -1.21999999999999998e-91

                          1. Initial program 81.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-+.f6481.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. Simplified81.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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

                          if -1.21999999999999998e-91 < x

                          1. Initial program 73.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-+.f6473.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. Simplified73.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-*.f6445.1%

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

                            \[\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-/.f6447.8%

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

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

                        Alternative 15: 59.4% accurate, 1.7× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 2.55 \cdot 10^{-35}:\\ \;\;\;\;\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 2.55e-35) (/ y x) (/ x (* y y))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (y <= 2.55e-35) {
                        		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 <= 2.55d-35) 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 <= 2.55e-35) {
                        		tmp = y / x;
                        	} else {
                        		tmp = x / (y * y);
                        	}
                        	return tmp;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	tmp = 0
                        	if y <= 2.55e-35:
                        		tmp = y / x
                        	else:
                        		tmp = x / (y * y)
                        	return tmp
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (y <= 2.55e-35)
                        		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 <= 2.55e-35)
                        		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, 2.55e-35], 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 2.55 \cdot 10^{-35}:\\
                        \;\;\;\;\frac{y}{x}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{x}{y \cdot y}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < 2.54999999999999993e-35

                          1. Initial program 75.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-+.f6475.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. Simplified75.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. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

                          if 2.54999999999999993e-35 < y

                          1. Initial program 62.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-+.f6462.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. Simplified62.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 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-*.f6464.2%

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

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

                        Alternative 16: 26.5% 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 71.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-+.f6471.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. Simplified71.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. associate-/r*N/A

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{y}{x}} \]
                        11. Add Preprocessing

                        Alternative 17: 4.4% accurate, 5.7× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{1}{x} \end{array} \]
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        (FPCore (x y) :precision binary64 (/ 1.0 x))
                        assert(x < y);
                        double code(double x, double y) {
                        	return 1.0 / x;
                        }
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        real(8) function code(x, y)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            code = 1.0d0 / x
                        end function
                        
                        assert x < y;
                        public static double code(double x, double y) {
                        	return 1.0 / x;
                        }
                        
                        [x, y] = sort([x, y])
                        def code(x, y):
                        	return 1.0 / x
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	return Float64(1.0 / x)
                        end
                        
                        x, y = num2cell(sort([x, y])){:}
                        function tmp = code(x, y)
                        	tmp = 1.0 / x;
                        end
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        code[x_, y_] := N[(1.0 / x), $MachinePrecision]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \frac{1}{x}
                        \end{array}
                        
                        Derivation
                        1. Initial program 71.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-+.f6471.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. Simplified71.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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{x}\right) \]
                          4. Simplified4.0%

                            \[\leadsto \color{blue}{\frac{1}{x}} \]
                          5. 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 2024160 
                          (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))))