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

Percentage Accurate: 68.2% → 99.8%
Time: 12.3s
Alternatives: 20
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 68.2% 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, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 73.3% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{+17}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-150}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-165}:\\ \;\;\;\;\frac{x}{y}\\ \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 -1e+17)
   (/ (/ y x) x)
   (if (<= x -1.25e-150)
     (/ x (* y y))
     (if (<= x 1.3e-165) (/ x y) (* (/ x y) (/ 1.0 y))))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -1e+17) {
		tmp = (y / x) / x;
	} else if (x <= -1.25e-150) {
		tmp = x / (y * y);
	} else if (x <= 1.3e-165) {
		tmp = x / y;
	} 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 <= (-1d+17)) then
        tmp = (y / x) / x
    else if (x <= (-1.25d-150)) then
        tmp = x / (y * y)
    else if (x <= 1.3d-165) then
        tmp = x / y
    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 <= -1e+17) {
		tmp = (y / x) / x;
	} else if (x <= -1.25e-150) {
		tmp = x / (y * y);
	} else if (x <= 1.3e-165) {
		tmp = x / y;
	} else {
		tmp = (x / y) * (1.0 / y);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if x <= -1e+17:
		tmp = (y / x) / x
	elif x <= -1.25e-150:
		tmp = x / (y * y)
	elif x <= 1.3e-165:
		tmp = x / y
	else:
		tmp = (x / y) * (1.0 / y)
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (x <= -1e+17)
		tmp = Float64(Float64(y / x) / x);
	elseif (x <= -1.25e-150)
		tmp = Float64(x / Float64(y * y));
	elseif (x <= 1.3e-165)
		tmp = Float64(x / y);
	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 <= -1e+17)
		tmp = (y / x) / x;
	elseif (x <= -1.25e-150)
		tmp = x / (y * y);
	elseif (x <= 1.3e-165)
		tmp = x / y;
	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, -1e+17], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.25e-150], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e-165], N[(x / y), $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 \cdot 10^{+17}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{-150}:\\
\;\;\;\;\frac{x}{y \cdot y}\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{-165}:\\
\;\;\;\;\frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1e17

    1. Initial program 64.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. Add Preprocessing
    3. Step-by-step derivation
      1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), x\right) \]
      4. Simplified83.0%

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

      if -1e17 < x < -1.24999999999999997e-150

      1. Initial program 84.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. Add Preprocessing
      3. Taylor expanded in y around inf

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

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

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

      if -1.24999999999999997e-150 < x < 1.30000000000000004e-165

      1. Initial program 54.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. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

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

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

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

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

      if 1.30000000000000004e-165 < x

      1. Initial program 72.4%

        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

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

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
      6. 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-/.f6437.6%

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

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

    Alternative 3: 73.4% accurate, 0.8× speedup?

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

      1. Initial program 65.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. Add Preprocessing
      3. Step-by-step derivation
        1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), x\right) \]
        4. Simplified81.5%

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

        if -1.12e15 < x < -1.25000000000000001e-151

        1. Initial program 83.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. Add Preprocessing
        3. Taylor expanded in y around inf

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

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

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

        if -1.25000000000000001e-151 < x < 2.7000000000000001e-164

        1. Initial program 54.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. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

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

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

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

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

        if 2.7000000000000001e-164 < x

        1. Initial program 72.4%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

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

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

          \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
        6. 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-/.f6437.6%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), y\right) \]
        7. Applied egg-rr37.6%

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

      Alternative 4: 71.6% accurate, 0.8× speedup?

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

        1. Initial program 65.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. Add Preprocessing
        3. Taylor expanded in x around inf

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

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

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

        if -1.25e11 < x < -3.4999999999999998e-150

        1. Initial program 83.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. Add Preprocessing
        3. Taylor expanded in y around inf

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

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

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

        if -3.4999999999999998e-150 < x < 3.6999999999999999e-164

        1. Initial program 54.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. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

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

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

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

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

        if 3.6999999999999999e-164 < x

        1. Initial program 72.4%

          \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

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

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

          \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
        6. 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-/.f6437.6%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), y\right) \]
        7. Applied egg-rr37.6%

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

      Alternative 5: 70.0% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{y \cdot y}\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{-152}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-164}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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 y))))
         (if (<= x -1.9e+15)
           (/ y (* x x))
           (if (<= x -5.2e-152) t_0 (if (<= x 5.1e-164) (/ x y) t_0)))))
      assert(x < y);
      double code(double x, double y) {
      	double t_0 = x / (y * y);
      	double tmp;
      	if (x <= -1.9e+15) {
      		tmp = y / (x * x);
      	} else if (x <= -5.2e-152) {
      		tmp = t_0;
      	} else if (x <= 5.1e-164) {
      		tmp = x / y;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      NOTE: x and y should be sorted in increasing order before calling this function.
      real(8) function code(x, y)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: t_0
          real(8) :: tmp
          t_0 = x / (y * y)
          if (x <= (-1.9d+15)) then
              tmp = y / (x * x)
          else if (x <= (-5.2d-152)) then
              tmp = t_0
          else if (x <= 5.1d-164) then
              tmp = x / y
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      assert x < y;
      public static double code(double x, double y) {
      	double t_0 = x / (y * y);
      	double tmp;
      	if (x <= -1.9e+15) {
      		tmp = y / (x * x);
      	} else if (x <= -5.2e-152) {
      		tmp = t_0;
      	} else if (x <= 5.1e-164) {
      		tmp = x / y;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      [x, y] = sort([x, y])
      def code(x, y):
      	t_0 = x / (y * y)
      	tmp = 0
      	if x <= -1.9e+15:
      		tmp = y / (x * x)
      	elif x <= -5.2e-152:
      		tmp = t_0
      	elif x <= 5.1e-164:
      		tmp = x / y
      	else:
      		tmp = t_0
      	return tmp
      
      x, y = sort([x, y])
      function code(x, y)
      	t_0 = Float64(x / Float64(y * y))
      	tmp = 0.0
      	if (x <= -1.9e+15)
      		tmp = Float64(y / Float64(x * x));
      	elseif (x <= -5.2e-152)
      		tmp = t_0;
      	elseif (x <= 5.1e-164)
      		tmp = Float64(x / y);
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      x, y = num2cell(sort([x, y])){:}
      function tmp_2 = code(x, y)
      	t_0 = x / (y * y);
      	tmp = 0.0;
      	if (x <= -1.9e+15)
      		tmp = y / (x * x);
      	elseif (x <= -5.2e-152)
      		tmp = t_0;
      	elseif (x <= 5.1e-164)
      		tmp = x / y;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x and y should be sorted in increasing order before calling this function.
      code[x_, y_] := Block[{t$95$0 = N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e+15], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-152], t$95$0, If[LessEqual[x, 5.1e-164], N[(x / y), $MachinePrecision], t$95$0]]]]
      
      \begin{array}{l}
      [x, y] = \mathsf{sort}([x, y])\\
      \\
      \begin{array}{l}
      t_0 := \frac{x}{y \cdot y}\\
      \mathbf{if}\;x \leq -1.9 \cdot 10^{+15}:\\
      \;\;\;\;\frac{y}{x \cdot x}\\
      
      \mathbf{elif}\;x \leq -5.2 \cdot 10^{-152}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;x \leq 5.1 \cdot 10^{-164}:\\
      \;\;\;\;\frac{x}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -1.9e15

        1. Initial program 65.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. Add Preprocessing
        3. Taylor expanded in x around inf

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

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

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

        if -1.9e15 < x < -5.20000000000000026e-152 or 5.10000000000000036e-164 < x

        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. Add Preprocessing
        3. Taylor expanded in y around inf

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

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

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

        if -5.20000000000000026e-152 < x < 5.10000000000000036e-164

        1. Initial program 54.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. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

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

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

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

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

      Alternative 6: 98.2% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{y + x}\\ \mathbf{if}\;x \leq -4000000000:\\ \;\;\;\;\frac{y \cdot \frac{t\_0}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \frac{\frac{y}{y + 1}}{y + x}\\ \end{array} \end{array} \]
      NOTE: x and y should be sorted in increasing order before calling this function.
      (FPCore (x y)
       :precision binary64
       (let* ((t_0 (/ x (+ y x))))
         (if (<= x -4000000000.0)
           (/ (* y (/ t_0 (+ y x))) (+ y x))
           (* t_0 (/ (/ y (+ y 1.0)) (+ y x))))))
      assert(x < y);
      double code(double x, double y) {
      	double t_0 = x / (y + x);
      	double tmp;
      	if (x <= -4000000000.0) {
      		tmp = (y * (t_0 / (y + x))) / (y + x);
      	} else {
      		tmp = t_0 * ((y / (y + 1.0)) / (y + x));
      	}
      	return tmp;
      }
      
      NOTE: x and y should be sorted in increasing order before calling this function.
      real(8) function code(x, y)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: t_0
          real(8) :: tmp
          t_0 = x / (y + x)
          if (x <= (-4000000000.0d0)) then
              tmp = (y * (t_0 / (y + x))) / (y + x)
          else
              tmp = t_0 * ((y / (y + 1.0d0)) / (y + x))
          end if
          code = tmp
      end function
      
      assert x < y;
      public static double code(double x, double y) {
      	double t_0 = x / (y + x);
      	double tmp;
      	if (x <= -4000000000.0) {
      		tmp = (y * (t_0 / (y + x))) / (y + x);
      	} else {
      		tmp = t_0 * ((y / (y + 1.0)) / (y + x));
      	}
      	return tmp;
      }
      
      [x, y] = sort([x, y])
      def code(x, y):
      	t_0 = x / (y + x)
      	tmp = 0
      	if x <= -4000000000.0:
      		tmp = (y * (t_0 / (y + x))) / (y + x)
      	else:
      		tmp = t_0 * ((y / (y + 1.0)) / (y + x))
      	return tmp
      
      x, y = sort([x, y])
      function code(x, y)
      	t_0 = Float64(x / Float64(y + x))
      	tmp = 0.0
      	if (x <= -4000000000.0)
      		tmp = Float64(Float64(y * Float64(t_0 / Float64(y + x))) / Float64(y + x));
      	else
      		tmp = Float64(t_0 * Float64(Float64(y / Float64(y + 1.0)) / Float64(y + x)));
      	end
      	return tmp
      end
      
      x, y = num2cell(sort([x, y])){:}
      function tmp_2 = code(x, y)
      	t_0 = x / (y + x);
      	tmp = 0.0;
      	if (x <= -4000000000.0)
      		tmp = (y * (t_0 / (y + x))) / (y + x);
      	else
      		tmp = t_0 * ((y / (y + 1.0)) / (y + x));
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x and y should be sorted in increasing order before calling this function.
      code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4000000000.0], N[(N[(y * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      [x, y] = \mathsf{sort}([x, y])\\
      \\
      \begin{array}{l}
      t_0 := \frac{x}{y + x}\\
      \mathbf{if}\;x \leq -4000000000:\\
      \;\;\;\;\frac{y \cdot \frac{t\_0}{y + x}}{y + x}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0 \cdot \frac{\frac{y}{y + 1}}{y + x}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -4e9

        1. Initial program 65.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. Add Preprocessing
        3. Step-by-step derivation
          1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -4e9 < x

          1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(y, 1\right)\right), \mathsf{+.f64}\left(x, y\right)\right)\right) \]
          7. Simplified85.2%

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

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

        Alternative 7: 98.2% accurate, 0.8× speedup?

        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{y + x}\\ \mathbf{if}\;x \leq -4000000000:\\ \;\;\;\;t\_0 \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \frac{\frac{y}{y + 1}}{y + x}\\ \end{array} \end{array} \]
        NOTE: x and y should be sorted in increasing order before calling this function.
        (FPCore (x y)
         :precision binary64
         (let* ((t_0 (/ x (+ y x))))
           (if (<= x -4000000000.0)
             (* t_0 (/ (/ y (+ y x)) (+ y x)))
             (* t_0 (/ (/ y (+ y 1.0)) (+ y x))))))
        assert(x < y);
        double code(double x, double y) {
        	double t_0 = x / (y + x);
        	double tmp;
        	if (x <= -4000000000.0) {
        		tmp = t_0 * ((y / (y + x)) / (y + x));
        	} else {
        		tmp = t_0 * ((y / (y + 1.0)) / (y + x));
        	}
        	return tmp;
        }
        
        NOTE: x and y should be sorted in increasing order before calling this function.
        real(8) function code(x, y)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8) :: t_0
            real(8) :: tmp
            t_0 = x / (y + x)
            if (x <= (-4000000000.0d0)) then
                tmp = t_0 * ((y / (y + x)) / (y + x))
            else
                tmp = t_0 * ((y / (y + 1.0d0)) / (y + x))
            end if
            code = tmp
        end function
        
        assert x < y;
        public static double code(double x, double y) {
        	double t_0 = x / (y + x);
        	double tmp;
        	if (x <= -4000000000.0) {
        		tmp = t_0 * ((y / (y + x)) / (y + x));
        	} else {
        		tmp = t_0 * ((y / (y + 1.0)) / (y + x));
        	}
        	return tmp;
        }
        
        [x, y] = sort([x, y])
        def code(x, y):
        	t_0 = x / (y + x)
        	tmp = 0
        	if x <= -4000000000.0:
        		tmp = t_0 * ((y / (y + x)) / (y + x))
        	else:
        		tmp = t_0 * ((y / (y + 1.0)) / (y + x))
        	return tmp
        
        x, y = sort([x, y])
        function code(x, y)
        	t_0 = Float64(x / Float64(y + x))
        	tmp = 0.0
        	if (x <= -4000000000.0)
        		tmp = Float64(t_0 * Float64(Float64(y / Float64(y + x)) / Float64(y + x)));
        	else
        		tmp = Float64(t_0 * Float64(Float64(y / Float64(y + 1.0)) / Float64(y + x)));
        	end
        	return tmp
        end
        
        x, y = num2cell(sort([x, y])){:}
        function tmp_2 = code(x, y)
        	t_0 = x / (y + x);
        	tmp = 0.0;
        	if (x <= -4000000000.0)
        		tmp = t_0 * ((y / (y + x)) / (y + x));
        	else
        		tmp = t_0 * ((y / (y + 1.0)) / (y + x));
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x and y should be sorted in increasing order before calling this function.
        code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4000000000.0], N[(t$95$0 * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        [x, y] = \mathsf{sort}([x, y])\\
        \\
        \begin{array}{l}
        t_0 := \frac{x}{y + x}\\
        \mathbf{if}\;x \leq -4000000000:\\
        \;\;\;\;t\_0 \cdot \frac{\frac{y}{y + x}}{y + x}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0 \cdot \frac{\frac{y}{y + 1}}{y + x}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -4e9

          1. Initial program 65.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. Add Preprocessing
          3. Step-by-step derivation
            1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4e9 < x

            1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, y\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(y, 1\right)\right), \mathsf{+.f64}\left(x, y\right)\right)\right) \]
            7. Simplified85.2%

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

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

          Alternative 8: 92.7% accurate, 0.8× speedup?

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

            1. Initial program 68.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. Add Preprocessing
            3. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.59999999999999984e-5 < x

            1. Initial program 66.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. Add Preprocessing
            3. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 86.7% accurate, 0.8× speedup?

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

            1. Initial program 67.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. Add Preprocessing
            3. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.4000000000000001e-148 < y

            1. Initial program 66.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. Add Preprocessing
            3. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.4 \cdot 10^{-148}:\\ \;\;\;\;\frac{\frac{y}{y + \left(x + 1\right)}}{x + y \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{y + \left(x + 1\right)}}{y + x} \cdot \frac{x}{y}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 82.3% accurate, 0.9× speedup?

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

            1. Initial program 71.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. Add Preprocessing
            3. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.35e-157 < x

            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. Add Preprocessing
            3. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

          Alternative 11: 82.2% accurate, 1.0× speedup?

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

            1. Initial program 57.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. Add Preprocessing
            3. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), x\right) \]
              4. Simplified82.2%

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

              if -4.2000000000000002e51 < x < -1.15000000000000004e-113

              1. Initial program 88.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. Add Preprocessing
              3. Taylor expanded in y around 0

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

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

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

              if -1.15000000000000004e-113 < x

              1. Initial program 64.8%

                \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

            Alternative 12: 80.7% accurate, 1.0× speedup?

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

              1. Initial program 57.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. Add Preprocessing
              3. Step-by-step derivation
                1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), x\right) \]
                4. Simplified82.2%

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

                if -4e51 < x < -1.55e-114

                1. Initial program 88.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. Add Preprocessing
                3. Taylor expanded in y around 0

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

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

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

                if -1.55e-114 < x

                1. Initial program 64.8%

                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

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

              Alternative 13: 99.8% accurate, 1.0× speedup?

              \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{x}{y + x} \cdot \frac{\frac{y}{y + \left(x + 1\right)}}{y + x} \end{array} \]
              NOTE: x and y should be sorted in increasing order before calling this function.
              (FPCore (x y)
               :precision binary64
               (* (/ x (+ y x)) (/ (/ y (+ y (+ x 1.0))) (+ y x))))
              assert(x < y);
              double code(double x, double y) {
              	return (x / (y + x)) * ((y / (y + (x + 1.0))) / (y + x));
              }
              
              NOTE: x and y should be sorted in increasing order before calling this function.
              real(8) function code(x, y)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  code = (x / (y + x)) * ((y / (y + (x + 1.0d0))) / (y + x))
              end function
              
              assert x < y;
              public static double code(double x, double y) {
              	return (x / (y + x)) * ((y / (y + (x + 1.0))) / (y + x));
              }
              
              [x, y] = sort([x, y])
              def code(x, y):
              	return (x / (y + x)) * ((y / (y + (x + 1.0))) / (y + x))
              
              x, y = sort([x, y])
              function code(x, y)
              	return Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / Float64(y + Float64(x + 1.0))) / Float64(y + x)))
              end
              
              x, y = num2cell(sort([x, y])){:}
              function tmp = code(x, y)
              	tmp = (x / (y + x)) * ((y / (y + (x + 1.0))) / (y + x));
              end
              
              NOTE: x and y should be sorted in increasing order before calling this function.
              code[x_, y_] := N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              [x, y] = \mathsf{sort}([x, y])\\
              \\
              \frac{x}{y + x} \cdot \frac{\frac{y}{y + \left(x + 1\right)}}{y + x}
              \end{array}
              
              Derivation
              1. Initial program 67.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. Add Preprocessing
              3. Step-by-step derivation
                1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 14: 82.3% accurate, 1.2× speedup?

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

                1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -5.5e-112 < x

                1. Initial program 64.8%

                  \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

              Alternative 15: 82.2% accurate, 1.4× speedup?

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

                1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -6.1999999999999995e-112 < x

                  1. Initial program 64.8%

                    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{\frac{x}{y + 1}}{y}} \]
                7. Recombined 2 regimes into one program.
                8. Add Preprocessing

                Alternative 16: 78.4% accurate, 1.4× speedup?

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

                  1. Initial program 65.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. Add Preprocessing
                  3. Step-by-step derivation
                    1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), x\right) \]
                    4. Simplified80.0%

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

                    if -7e12 < x

                    1. Initial program 67.7%

                      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0

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

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

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

                  Alternative 17: 46.8% accurate, 1.7× speedup?

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

                    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. Add Preprocessing
                    3. Taylor expanded in x around 0

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

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

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

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

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

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

                    if 1 < y

                    1. Initial program 58.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. Add Preprocessing
                    3. Taylor expanded in y around inf

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

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

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

                  Alternative 18: 27.6% accurate, 2.1× speedup?

                  \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -7500000000:\\ \;\;\;\;\frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
                  NOTE: x and y should be sorted in increasing order before calling this function.
                  (FPCore (x y) :precision binary64 (if (<= x -7500000000.0) (/ 1.0 x) (/ x y)))
                  assert(x < y);
                  double code(double x, double y) {
                  	double tmp;
                  	if (x <= -7500000000.0) {
                  		tmp = 1.0 / x;
                  	} else {
                  		tmp = x / y;
                  	}
                  	return tmp;
                  }
                  
                  NOTE: x and y should be sorted in increasing order before calling this function.
                  real(8) function code(x, y)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8) :: tmp
                      if (x <= (-7500000000.0d0)) then
                          tmp = 1.0d0 / x
                      else
                          tmp = x / y
                      end if
                      code = tmp
                  end function
                  
                  assert x < y;
                  public static double code(double x, double y) {
                  	double tmp;
                  	if (x <= -7500000000.0) {
                  		tmp = 1.0 / x;
                  	} else {
                  		tmp = x / y;
                  	}
                  	return tmp;
                  }
                  
                  [x, y] = sort([x, y])
                  def code(x, y):
                  	tmp = 0
                  	if x <= -7500000000.0:
                  		tmp = 1.0 / x
                  	else:
                  		tmp = x / y
                  	return tmp
                  
                  x, y = sort([x, y])
                  function code(x, y)
                  	tmp = 0.0
                  	if (x <= -7500000000.0)
                  		tmp = Float64(1.0 / x);
                  	else
                  		tmp = Float64(x / y);
                  	end
                  	return tmp
                  end
                  
                  x, y = num2cell(sort([x, y])){:}
                  function tmp_2 = code(x, y)
                  	tmp = 0.0;
                  	if (x <= -7500000000.0)
                  		tmp = 1.0 / x;
                  	else
                  		tmp = x / y;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: x and y should be sorted in increasing order before calling this function.
                  code[x_, y_] := If[LessEqual[x, -7500000000.0], N[(1.0 / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [x, y] = \mathsf{sort}([x, y])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq -7500000000:\\
                  \;\;\;\;\frac{1}{x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{x}{y}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -7.5e9

                    1. Initial program 65.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. Add Preprocessing
                    3. Step-by-step derivation
                      1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -7.5e9 < x

                      1. Initial program 67.7%

                        \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around 0

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

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

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

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

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

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

                    Alternative 19: 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 67.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. Add Preprocessing
                    3. Step-by-step derivation
                      1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\frac{y}{y + \left(x + 1\right)}}{\color{blue}{x}} \]
                      2. Taylor expanded in y 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

                      Alternative 20: 4.0% accurate, 5.7× speedup?

                      \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{0.5}{y} \end{array} \]
                      NOTE: x and y should be sorted in increasing order before calling this function.
                      (FPCore (x y) :precision binary64 (/ 0.5 y))
                      assert(x < y);
                      double code(double x, double y) {
                      	return 0.5 / 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 = 0.5d0 / y
                      end function
                      
                      assert x < y;
                      public static double code(double x, double y) {
                      	return 0.5 / y;
                      }
                      
                      [x, y] = sort([x, y])
                      def code(x, y):
                      	return 0.5 / y
                      
                      x, y = sort([x, y])
                      function code(x, y)
                      	return Float64(0.5 / y)
                      end
                      
                      x, y = num2cell(sort([x, y])){:}
                      function tmp = code(x, y)
                      	tmp = 0.5 / y;
                      end
                      
                      NOTE: x and y should be sorted in increasing order before calling this function.
                      code[x_, y_] := N[(0.5 / y), $MachinePrecision]
                      
                      \begin{array}{l}
                      [x, y] = \mathsf{sort}([x, y])\\
                      \\
                      \frac{0.5}{y}
                      \end{array}
                      
                      Derivation
                      1. Initial program 67.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. Add Preprocessing
                      3. Step-by-step derivation
                        1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{/.f64}\left(\frac{1}{2}, \color{blue}{y}\right) \]
                      10. Simplified4.0%

                        \[\leadsto \color{blue}{\frac{0.5}{y}} \]
                      11. 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 2024161 
                      (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))))