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

Percentage Accurate: 70.2% → 99.8%
Time: 17.2s
Alternatives: 25
Speedup: 1.9×

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 25 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: 70.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, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.1% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ t_1 := x + \left(y + 1\right)\\ \mathbf{if}\;x \leq -2.4 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{t_1} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.9:\\ \;\;\;\;\frac{y}{x} \cdot t_0\\ \mathbf{elif}\;x \leq -6.8 \cdot 10^{-192}:\\ \;\;\;\;t_0 \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t_1} \cdot \frac{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) (+ y x)))) (t_1 (+ x (+ y 1.0))))
   (if (<= x -2.4e+160)
     (* (/ y t_1) (/ 1.0 x))
     (if (<= x -2.9)
       (* (/ y x) t_0)
       (if (<= x -6.8e-192)
         (* t_0 (/ y (+ y 1.0)))
         (* (/ x t_1) (/ 1.0 (+ y x))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = x / ((y + x) * (y + x));
	double t_1 = x + (y + 1.0);
	double tmp;
	if (x <= -2.4e+160) {
		tmp = (y / t_1) * (1.0 / x);
	} else if (x <= -2.9) {
		tmp = (y / x) * t_0;
	} else if (x <= -6.8e-192) {
		tmp = t_0 * (y / (y + 1.0));
	} else {
		tmp = (x / t_1) * (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) :: t_1
    real(8) :: tmp
    t_0 = x / ((y + x) * (y + x))
    t_1 = x + (y + 1.0d0)
    if (x <= (-2.4d+160)) then
        tmp = (y / t_1) * (1.0d0 / x)
    else if (x <= (-2.9d0)) then
        tmp = (y / x) * t_0
    else if (x <= (-6.8d-192)) then
        tmp = t_0 * (y / (y + 1.0d0))
    else
        tmp = (x / t_1) * (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) * (y + x));
	double t_1 = x + (y + 1.0);
	double tmp;
	if (x <= -2.4e+160) {
		tmp = (y / t_1) * (1.0 / x);
	} else if (x <= -2.9) {
		tmp = (y / x) * t_0;
	} else if (x <= -6.8e-192) {
		tmp = t_0 * (y / (y + 1.0));
	} else {
		tmp = (x / t_1) * (1.0 / (y + x));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = x / ((y + x) * (y + x))
	t_1 = x + (y + 1.0)
	tmp = 0
	if x <= -2.4e+160:
		tmp = (y / t_1) * (1.0 / x)
	elif x <= -2.9:
		tmp = (y / x) * t_0
	elif x <= -6.8e-192:
		tmp = t_0 * (y / (y + 1.0))
	else:
		tmp = (x / t_1) * (1.0 / (y + x))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(x / Float64(Float64(y + x) * Float64(y + x)))
	t_1 = Float64(x + Float64(y + 1.0))
	tmp = 0.0
	if (x <= -2.4e+160)
		tmp = Float64(Float64(y / t_1) * Float64(1.0 / x));
	elseif (x <= -2.9)
		tmp = Float64(Float64(y / x) * t_0);
	elseif (x <= -6.8e-192)
		tmp = Float64(t_0 * Float64(y / Float64(y + 1.0)));
	else
		tmp = Float64(Float64(x / t_1) * Float64(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) * (y + x));
	t_1 = x + (y + 1.0);
	tmp = 0.0;
	if (x <= -2.4e+160)
		tmp = (y / t_1) * (1.0 / x);
	elseif (x <= -2.9)
		tmp = (y / x) * t_0;
	elseif (x <= -6.8e-192)
		tmp = t_0 * (y / (y + 1.0));
	else
		tmp = (x / t_1) * (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[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+160], N[(N[(y / t$95$1), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9], N[(N[(y / x), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, -6.8e-192], N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t$95$1), $MachinePrecision] * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
t_1 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -2.4 \cdot 10^{+160}:\\
\;\;\;\;\frac{y}{t_1} \cdot \frac{1}{x}\\

\mathbf{elif}\;x \leq -2.9:\\
\;\;\;\;\frac{y}{x} \cdot t_0\\

\mathbf{elif}\;x \leq -6.8 \cdot 10^{-192}:\\
\;\;\;\;t_0 \cdot \frac{y}{y + 1}\\

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


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

    1. Initial program 59.0%

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

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

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

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

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

    if -2.4000000000000001e160 < x < -2.89999999999999991

    1. Initial program 62.9%

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

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

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

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

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

    if -2.89999999999999991 < x < -6.80000000000000003e-192

    1. Initial program 94.8%

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

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

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

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

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

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

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

    if -6.80000000000000003e-192 < x

    1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.9:\\ \;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -6.8 \cdot 10^{-192}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{1}{y + x}\\ \end{array} \]

Alternative 3: 91.0% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ t_1 := \frac{y}{x + \left(y + 1\right)}\\ \mathbf{if}\;x \leq -3.1 \cdot 10^{+160}:\\ \;\;\;\;t_1 \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -3:\\ \;\;\;\;\frac{y}{x} \cdot t_0\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\ \;\;\;\;t_0 \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{\frac{x}{y}}{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) (+ y x)))) (t_1 (/ y (+ x (+ y 1.0)))))
   (if (<= x -3.1e+160)
     (* t_1 (/ 1.0 x))
     (if (<= x -3.0)
       (* (/ y x) t_0)
       (if (<= x -1.28e-154)
         (* t_0 (/ y (+ y 1.0)))
         (* t_1 (/ (/ x y) (+ y x))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = x / ((y + x) * (y + x));
	double t_1 = y / (x + (y + 1.0));
	double tmp;
	if (x <= -3.1e+160) {
		tmp = t_1 * (1.0 / x);
	} else if (x <= -3.0) {
		tmp = (y / x) * t_0;
	} else if (x <= -1.28e-154) {
		tmp = t_0 * (y / (y + 1.0));
	} else {
		tmp = t_1 * ((x / y) / (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) :: t_1
    real(8) :: tmp
    t_0 = x / ((y + x) * (y + x))
    t_1 = y / (x + (y + 1.0d0))
    if (x <= (-3.1d+160)) then
        tmp = t_1 * (1.0d0 / x)
    else if (x <= (-3.0d0)) then
        tmp = (y / x) * t_0
    else if (x <= (-1.28d-154)) then
        tmp = t_0 * (y / (y + 1.0d0))
    else
        tmp = t_1 * ((x / y) / (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) * (y + x));
	double t_1 = y / (x + (y + 1.0));
	double tmp;
	if (x <= -3.1e+160) {
		tmp = t_1 * (1.0 / x);
	} else if (x <= -3.0) {
		tmp = (y / x) * t_0;
	} else if (x <= -1.28e-154) {
		tmp = t_0 * (y / (y + 1.0));
	} else {
		tmp = t_1 * ((x / y) / (y + x));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = x / ((y + x) * (y + x))
	t_1 = y / (x + (y + 1.0))
	tmp = 0
	if x <= -3.1e+160:
		tmp = t_1 * (1.0 / x)
	elif x <= -3.0:
		tmp = (y / x) * t_0
	elif x <= -1.28e-154:
		tmp = t_0 * (y / (y + 1.0))
	else:
		tmp = t_1 * ((x / y) / (y + x))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(x / Float64(Float64(y + x) * Float64(y + x)))
	t_1 = Float64(y / Float64(x + Float64(y + 1.0)))
	tmp = 0.0
	if (x <= -3.1e+160)
		tmp = Float64(t_1 * Float64(1.0 / x));
	elseif (x <= -3.0)
		tmp = Float64(Float64(y / x) * t_0);
	elseif (x <= -1.28e-154)
		tmp = Float64(t_0 * Float64(y / Float64(y + 1.0)));
	else
		tmp = Float64(t_1 * Float64(Float64(x / y) / Float64(y + x)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = x / ((y + x) * (y + x));
	t_1 = y / (x + (y + 1.0));
	tmp = 0.0;
	if (x <= -3.1e+160)
		tmp = t_1 * (1.0 / x);
	elseif (x <= -3.0)
		tmp = (y / x) * t_0;
	elseif (x <= -1.28e-154)
		tmp = t_0 * (y / (y + 1.0));
	else
		tmp = t_1 * ((x / y) / (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[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.1e+160], N[(t$95$1 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.0], N[(N[(y / x), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, -1.28e-154], N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
t_1 := \frac{y}{x + \left(y + 1\right)}\\
\mathbf{if}\;x \leq -3.1 \cdot 10^{+160}:\\
\;\;\;\;t_1 \cdot \frac{1}{x}\\

\mathbf{elif}\;x \leq -3:\\
\;\;\;\;\frac{y}{x} \cdot t_0\\

\mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\
\;\;\;\;t_0 \cdot \frac{y}{y + 1}\\

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


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

    1. Initial program 59.0%

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

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

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

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

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

    if -3.0999999999999998e160 < x < -3

    1. Initial program 62.9%

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

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

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

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

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

    if -3 < x < -1.28000000000000005e-154

    1. Initial program 93.3%

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

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

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

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

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

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

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

    if -1.28000000000000005e-154 < x

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.1 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -3:\\ \;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{\frac{x}{y}}{y + x}\\ \end{array} \]

Alternative 4: 91.0% accurate, 0.8× speedup?

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

\mathbf{elif}\;x \leq -2.9:\\
\;\;\;\;\frac{y}{x} \cdot t_0\\

\mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\
\;\;\;\;t_0 \cdot \frac{y}{y + 1}\\

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


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e160 < x < -2.89999999999999991

    1. Initial program 62.9%

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

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

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

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

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

    if -2.89999999999999991 < x < -1.28000000000000005e-154

    1. Initial program 93.3%

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

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

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

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

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

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

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

    if -1.28000000000000005e-154 < x

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+160}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x} \cdot \left(1 - \frac{y + 1}{x}\right)\\ \mathbf{elif}\;x \leq -2.9:\\ \;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{\frac{x}{y}}{y + x}\\ \end{array} \]

Alternative 5: 91.1% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ t_1 := x + \left(y + 1\right)\\ \mathbf{if}\;x \leq -1.85 \cdot 10^{+160}:\\ \;\;\;\;\frac{x}{t_1} \cdot \frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -3:\\ \;\;\;\;\frac{y}{x} \cdot t_0\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\ \;\;\;\;t_0 \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t_1} \cdot \frac{\frac{x}{y}}{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) (+ y x)))) (t_1 (+ x (+ y 1.0))))
   (if (<= x -1.85e+160)
     (* (/ x t_1) (/ (/ y x) (+ y x)))
     (if (<= x -3.0)
       (* (/ y x) t_0)
       (if (<= x -1.28e-154)
         (* t_0 (/ y (+ y 1.0)))
         (* (/ y t_1) (/ (/ x y) (+ y x))))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = x / ((y + x) * (y + x));
	double t_1 = x + (y + 1.0);
	double tmp;
	if (x <= -1.85e+160) {
		tmp = (x / t_1) * ((y / x) / (y + x));
	} else if (x <= -3.0) {
		tmp = (y / x) * t_0;
	} else if (x <= -1.28e-154) {
		tmp = t_0 * (y / (y + 1.0));
	} else {
		tmp = (y / t_1) * ((x / y) / (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) :: t_1
    real(8) :: tmp
    t_0 = x / ((y + x) * (y + x))
    t_1 = x + (y + 1.0d0)
    if (x <= (-1.85d+160)) then
        tmp = (x / t_1) * ((y / x) / (y + x))
    else if (x <= (-3.0d0)) then
        tmp = (y / x) * t_0
    else if (x <= (-1.28d-154)) then
        tmp = t_0 * (y / (y + 1.0d0))
    else
        tmp = (y / t_1) * ((x / y) / (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) * (y + x));
	double t_1 = x + (y + 1.0);
	double tmp;
	if (x <= -1.85e+160) {
		tmp = (x / t_1) * ((y / x) / (y + x));
	} else if (x <= -3.0) {
		tmp = (y / x) * t_0;
	} else if (x <= -1.28e-154) {
		tmp = t_0 * (y / (y + 1.0));
	} else {
		tmp = (y / t_1) * ((x / y) / (y + x));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	t_0 = x / ((y + x) * (y + x))
	t_1 = x + (y + 1.0)
	tmp = 0
	if x <= -1.85e+160:
		tmp = (x / t_1) * ((y / x) / (y + x))
	elif x <= -3.0:
		tmp = (y / x) * t_0
	elif x <= -1.28e-154:
		tmp = t_0 * (y / (y + 1.0))
	else:
		tmp = (y / t_1) * ((x / y) / (y + x))
	return tmp
x, y = sort([x, y])
function code(x, y)
	t_0 = Float64(x / Float64(Float64(y + x) * Float64(y + x)))
	t_1 = Float64(x + Float64(y + 1.0))
	tmp = 0.0
	if (x <= -1.85e+160)
		tmp = Float64(Float64(x / t_1) * Float64(Float64(y / x) / Float64(y + x)));
	elseif (x <= -3.0)
		tmp = Float64(Float64(y / x) * t_0);
	elseif (x <= -1.28e-154)
		tmp = Float64(t_0 * Float64(y / Float64(y + 1.0)));
	else
		tmp = Float64(Float64(y / t_1) * Float64(Float64(x / y) / Float64(y + x)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	t_0 = x / ((y + x) * (y + x));
	t_1 = x + (y + 1.0);
	tmp = 0.0;
	if (x <= -1.85e+160)
		tmp = (x / t_1) * ((y / x) / (y + x));
	elseif (x <= -3.0)
		tmp = (y / x) * t_0;
	elseif (x <= -1.28e-154)
		tmp = t_0 * (y / (y + 1.0));
	else
		tmp = (y / t_1) * ((x / y) / (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[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.85e+160], N[(N[(x / t$95$1), $MachinePrecision] * N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.0], N[(N[(y / x), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, -1.28e-154], N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / t$95$1), $MachinePrecision] * N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
t_1 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.85 \cdot 10^{+160}:\\
\;\;\;\;\frac{x}{t_1} \cdot \frac{\frac{y}{x}}{y + x}\\

\mathbf{elif}\;x \leq -3:\\
\;\;\;\;\frac{y}{x} \cdot t_0\\

\mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\
\;\;\;\;t_0 \cdot \frac{y}{y + 1}\\

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


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.85000000000000008e160 < x < -3

    1. Initial program 62.9%

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

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

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

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

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

    if -3 < x < -1.28000000000000005e-154

    1. Initial program 93.3%

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

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

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

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

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

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

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

    if -1.28000000000000005e-154 < x

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+160}:\\ \;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -3:\\ \;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{-154}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{\frac{x}{y}}{y + x}\\ \end{array} \]

Alternative 6: 94.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.90000000000000006e160

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000006e160 < x < -2.7999999999999998

    1. Initial program 62.9%

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

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

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

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

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

    if -2.7999999999999998 < x

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \color{blue}{\frac{x}{1 + y}} \]
    9. Step-by-step derivation
      1. +-commutative83.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{+160}:\\ \;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -2.8:\\ \;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{y + 1}\\ \end{array} \]

Alternative 7: 94.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.90000000000000006e160

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000006e160 < x < -2.60000000000000009

    1. Initial program 62.9%

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

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

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

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

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

    if -2.60000000000000009 < x

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{y + 1} \]
      2. frac-times84.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{\frac{y}{y + x} \cdot x}{y + 1}} \]
      4. *-commutative84.0%

        \[\leadsto \frac{1}{x + y} \cdot \frac{\color{blue}{x \cdot \frac{y}{y + x}}}{y + 1} \]
      5. +-commutative84.0%

        \[\leadsto \frac{1}{x + y} \cdot \frac{x \cdot \frac{y}{\color{blue}{x + y}}}{y + 1} \]
    10. Applied egg-rr84.0%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot \frac{y}{x + y}}{y + 1}}}{x + y} \]
      3. associate-/l*84.4%

        \[\leadsto \frac{\color{blue}{\frac{x}{\frac{y + 1}{\frac{y}{x + y}}}}}{x + y} \]
      4. associate-/r/84.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.9 \cdot 10^{+160}:\\ \;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -2.6:\\ \;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\left(y + x\right) \cdot \frac{y + 1}{y}}}{y + x}\\ \end{array} \]

Alternative 8: 75.4% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{y}}}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= x -1.0)
   (* (/ y x) (/ 1.0 x))
   (if (<= x -8e-97)
     (- (/ y x) y)
     (if (<= x -5.5e-112)
       (/ x (* y y))
       (if (<= x -3.3e-118)
         (/ y x)
         (if (<= x 3.7e-231) (/ x y) (/ 1.0 (/ y (/ x y)))))))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) * (1.0 / x);
	} else if (x <= -8e-97) {
		tmp = (y / x) - y;
	} else if (x <= -5.5e-112) {
		tmp = x / (y * y);
	} else if (x <= -3.3e-118) {
		tmp = y / x;
	} else if (x <= 3.7e-231) {
		tmp = x / y;
	} else {
		tmp = 1.0 / (y / (x / y));
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.0d0)) then
        tmp = (y / x) * (1.0d0 / x)
    else if (x <= (-8d-97)) then
        tmp = (y / x) - y
    else if (x <= (-5.5d-112)) then
        tmp = x / (y * y)
    else if (x <= (-3.3d-118)) then
        tmp = y / x
    else if (x <= 3.7d-231) then
        tmp = x / y
    else
        tmp = 1.0d0 / (y / (x / y))
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) * (1.0 / x);
	} else if (x <= -8e-97) {
		tmp = (y / x) - y;
	} else if (x <= -5.5e-112) {
		tmp = x / (y * y);
	} else if (x <= -3.3e-118) {
		tmp = y / x;
	} else if (x <= 3.7e-231) {
		tmp = x / y;
	} else {
		tmp = 1.0 / (y / (x / y));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if x <= -1.0:
		tmp = (y / x) * (1.0 / x)
	elif x <= -8e-97:
		tmp = (y / x) - y
	elif x <= -5.5e-112:
		tmp = x / (y * y)
	elif x <= -3.3e-118:
		tmp = y / x
	elif x <= 3.7e-231:
		tmp = x / y
	else:
		tmp = 1.0 / (y / (x / y))
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(Float64(y / x) * Float64(1.0 / x));
	elseif (x <= -8e-97)
		tmp = Float64(Float64(y / x) - y);
	elseif (x <= -5.5e-112)
		tmp = Float64(x / Float64(y * y));
	elseif (x <= -3.3e-118)
		tmp = Float64(y / x);
	elseif (x <= 3.7e-231)
		tmp = Float64(x / y);
	else
		tmp = Float64(1.0 / Float64(y / Float64(x / y)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.0)
		tmp = (y / x) * (1.0 / x);
	elseif (x <= -8e-97)
		tmp = (y / x) - y;
	elseif (x <= -5.5e-112)
		tmp = x / (y * y);
	elseif (x <= -3.3e-118)
		tmp = y / x;
	elseif (x <= 3.7e-231)
		tmp = x / y;
	else
		tmp = 1.0 / (y / (x / y));
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8e-97], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, -5.5e-112], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.3e-118], N[(y / x), $MachinePrecision], If[LessEqual[x, 3.7e-231], N[(x / y), $MachinePrecision], N[(1.0 / N[(y / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x} - y\\

\mathbf{elif}\;x \leq -5.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{x}{y \cdot y}\\

\mathbf{elif}\;x \leq -3.3 \cdot 10^{-118}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{y}\\

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


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

    1. Initial program 61.1%

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

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

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

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

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

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

    if -1 < x < -8.00000000000000029e-97

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-145.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified45.5%

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

    if -8.00000000000000029e-97 < x < -5.5e-112

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 100.0%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow2100.0%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified100.0%

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

    if -5.5e-112 < x < -3.3e-118

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-11.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified1.8%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Taylor expanded in x around 0 1.8%

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

    if -3.3e-118 < x < 3.69999999999999993e-231

    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. Step-by-step derivation
      1. times-frac88.9%

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

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

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

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

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

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

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

    if 3.69999999999999993e-231 < x

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 31.2%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow231.2%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified31.2%

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

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

        \[\leadsto \color{blue}{{\left(\frac{y \cdot y}{x}\right)}^{-1}} \]
    8. Applied egg-rr30.7%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{y \cdot y}{x}}} \]
      2. associate-/l*31.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{y}{\frac{x}{y}}}} \]
    10. Simplified31.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{y}}}\\ \end{array} \]

Alternative 9: 90.0% accurate, 1.0× speedup?

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

\mathbf{elif}\;y \leq 0.0051:\\
\;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < 5.59999999999999978e-251

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

    if 5.59999999999999978e-251 < y < 0.0051000000000000004

    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. Step-by-step derivation
      1. associate-/r*85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0051000000000000004 < y < 3.09999999999999989e155

    1. Initial program 62.0%

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

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

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

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

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

    if 3.09999999999999989e155 < y

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.6 \cdot 10^{-251}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{elif}\;y \leq 0.0051:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+155}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{1}{y}\\ \end{array} \]

Alternative 10: 95.9% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3e-10

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e-10 < x

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{y + 1} \]
      2. frac-times84.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \frac{\frac{y}{y + x} \cdot x}{y + 1}} \]
      4. *-commutative84.0%

        \[\leadsto \frac{1}{x + y} \cdot \frac{\color{blue}{x \cdot \frac{y}{y + x}}}{y + 1} \]
      5. +-commutative84.0%

        \[\leadsto \frac{1}{x + y} \cdot \frac{x \cdot \frac{y}{\color{blue}{x + y}}}{y + 1} \]
    10. Applied egg-rr84.0%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot \frac{y}{x + y}}{y + 1}}}{x + y} \]
      3. associate-/l*84.4%

        \[\leadsto \frac{\color{blue}{\frac{x}{\frac{y + 1}{\frac{y}{x + y}}}}}{x + y} \]
      4. associate-/r/84.4%

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

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

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

Alternative 11: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 72.3% accurate, 1.1× 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:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{-111}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\ \;\;\;\;\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.0)
     (/ y (* x x))
     (if (<= x -2.9e-97)
       (- (/ y x) y)
       (if (<= x -1.28e-111)
         t_0
         (if (<= x -3.1e-118) (/ y x) (if (<= x 3.7e-231) (/ x y) t_0)))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = x / (y * y);
	double tmp;
	if (x <= -1.0) {
		tmp = y / (x * x);
	} else if (x <= -2.9e-97) {
		tmp = (y / x) - y;
	} else if (x <= -1.28e-111) {
		tmp = t_0;
	} else if (x <= -3.1e-118) {
		tmp = y / x;
	} else if (x <= 3.7e-231) {
		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.0d0)) then
        tmp = y / (x * x)
    else if (x <= (-2.9d-97)) then
        tmp = (y / x) - y
    else if (x <= (-1.28d-111)) then
        tmp = t_0
    else if (x <= (-3.1d-118)) then
        tmp = y / x
    else if (x <= 3.7d-231) 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.0) {
		tmp = y / (x * x);
	} else if (x <= -2.9e-97) {
		tmp = (y / x) - y;
	} else if (x <= -1.28e-111) {
		tmp = t_0;
	} else if (x <= -3.1e-118) {
		tmp = y / x;
	} else if (x <= 3.7e-231) {
		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.0:
		tmp = y / (x * x)
	elif x <= -2.9e-97:
		tmp = (y / x) - y
	elif x <= -1.28e-111:
		tmp = t_0
	elif x <= -3.1e-118:
		tmp = y / x
	elif x <= 3.7e-231:
		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.0)
		tmp = Float64(y / Float64(x * x));
	elseif (x <= -2.9e-97)
		tmp = Float64(Float64(y / x) - y);
	elseif (x <= -1.28e-111)
		tmp = t_0;
	elseif (x <= -3.1e-118)
		tmp = Float64(y / x);
	elseif (x <= 3.7e-231)
		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.0)
		tmp = y / (x * x);
	elseif (x <= -2.9e-97)
		tmp = (y / x) - y;
	elseif (x <= -1.28e-111)
		tmp = t_0;
	elseif (x <= -3.1e-118)
		tmp = y / x;
	elseif (x <= 3.7e-231)
		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.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e-97], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, -1.28e-111], t$95$0, If[LessEqual[x, -3.1e-118], N[(y / x), $MachinePrecision], If[LessEqual[x, 3.7e-231], 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:\\
\;\;\;\;\frac{y}{x \cdot x}\\

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

\mathbf{elif}\;x \leq -1.28 \cdot 10^{-111}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq -3.1 \cdot 10^{-118}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{y}\\

\mathbf{else}:\\
\;\;\;\;t_0\\


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

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in x around inf 67.3%

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. unpow267.3%

        \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
    6. Simplified67.3%

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

    if -1 < x < -2.8999999999999999e-97

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-143.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified43.0%

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

    if -2.8999999999999999e-97 < x < -1.27999999999999997e-111 or 3.69999999999999993e-231 < x

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 33.5%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow233.5%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified33.5%

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

    if -1.27999999999999997e-111 < x < -3.1000000000000001e-118

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-11.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified1.8%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Taylor expanded in x around 0 1.8%

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

    if -3.1000000000000001e-118 < x < 3.69999999999999993e-231

    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. Step-by-step derivation
      1. times-frac88.9%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{y}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification54.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{-111}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 13: 74.5% accurate, 1.1× 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:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -1.06 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-113}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\ \;\;\;\;\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.0)
     (* (/ y x) (/ 1.0 x))
     (if (<= x -1.06e-97)
       (- (/ y x) y)
       (if (<= x -1.8e-113)
         t_0
         (if (<= x -5.5e-118) (/ y x) (if (<= x 3.7e-231) (/ x y) t_0)))))))
assert(x < y);
double code(double x, double y) {
	double t_0 = x / (y * y);
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) * (1.0 / x);
	} else if (x <= -1.06e-97) {
		tmp = (y / x) - y;
	} else if (x <= -1.8e-113) {
		tmp = t_0;
	} else if (x <= -5.5e-118) {
		tmp = y / x;
	} else if (x <= 3.7e-231) {
		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.0d0)) then
        tmp = (y / x) * (1.0d0 / x)
    else if (x <= (-1.06d-97)) then
        tmp = (y / x) - y
    else if (x <= (-1.8d-113)) then
        tmp = t_0
    else if (x <= (-5.5d-118)) then
        tmp = y / x
    else if (x <= 3.7d-231) 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.0) {
		tmp = (y / x) * (1.0 / x);
	} else if (x <= -1.06e-97) {
		tmp = (y / x) - y;
	} else if (x <= -1.8e-113) {
		tmp = t_0;
	} else if (x <= -5.5e-118) {
		tmp = y / x;
	} else if (x <= 3.7e-231) {
		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.0:
		tmp = (y / x) * (1.0 / x)
	elif x <= -1.06e-97:
		tmp = (y / x) - y
	elif x <= -1.8e-113:
		tmp = t_0
	elif x <= -5.5e-118:
		tmp = y / x
	elif x <= 3.7e-231:
		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.0)
		tmp = Float64(Float64(y / x) * Float64(1.0 / x));
	elseif (x <= -1.06e-97)
		tmp = Float64(Float64(y / x) - y);
	elseif (x <= -1.8e-113)
		tmp = t_0;
	elseif (x <= -5.5e-118)
		tmp = Float64(y / x);
	elseif (x <= 3.7e-231)
		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.0)
		tmp = (y / x) * (1.0 / x);
	elseif (x <= -1.06e-97)
		tmp = (y / x) - y;
	elseif (x <= -1.8e-113)
		tmp = t_0;
	elseif (x <= -5.5e-118)
		tmp = y / x;
	elseif (x <= 3.7e-231)
		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.0], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.06e-97], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, -1.8e-113], t$95$0, If[LessEqual[x, -5.5e-118], N[(y / x), $MachinePrecision], If[LessEqual[x, 3.7e-231], 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:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\

\mathbf{elif}\;x \leq -1.06 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x} - y\\

\mathbf{elif}\;x \leq -1.8 \cdot 10^{-113}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq -5.5 \cdot 10^{-118}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{y}\\

\mathbf{else}:\\
\;\;\;\;t_0\\


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

    1. Initial program 61.1%

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

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

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

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

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

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

    if -1 < x < -1.06000000000000006e-97

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-143.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified43.0%

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

    if -1.06000000000000006e-97 < x < -1.79999999999999987e-113 or 3.69999999999999993e-231 < x

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 33.5%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow233.5%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified33.5%

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

    if -1.79999999999999987e-113 < x < -5.5000000000000003e-118

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-11.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified1.8%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Taylor expanded in x around 0 1.8%

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

    if -5.5000000000000003e-118 < x < 3.69999999999999993e-231

    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. Step-by-step derivation
      1. times-frac88.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -1.06 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-113}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 14: 86.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.2000000000000002e-19

    1. Initial program 60.8%

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

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

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

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

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

    if -7.2000000000000002e-19 < x < -2.4e-152

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e-152 < x

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
      3. +-commutative54.9%

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

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{y + 1}}}{y} \]
    10. Simplified55.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{-19}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \]

Alternative 15: 82.5% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -2.02 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{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 -2.02e-84)
   (* (/ y (+ x (+ y 1.0))) (/ 1.0 x))
   (/ (/ x (+ y 1.0)) y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -2.02e-84) {
		tmp = (y / (x + (y + 1.0))) * (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 <= (-2.02d-84)) then
        tmp = (y / (x + (y + 1.0d0))) * (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 <= -2.02e-84) {
		tmp = (y / (x + (y + 1.0))) * (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 <= -2.02e-84:
		tmp = (y / (x + (y + 1.0))) * (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 <= -2.02e-84)
		tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) * Float64(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 <= -2.02e-84)
		tmp = (y / (x + (y + 1.0))) * (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, -2.02e-84], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / 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 -2.02 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{1}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.02e-84

    1. Initial program 66.5%

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

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

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

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

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

    if -2.02e-84 < x

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
      3. +-commutative58.7%

        \[\leadsto \frac{1}{y} \cdot \frac{x}{\color{blue}{1 + y}} \]
    8. Applied egg-rr58.7%

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{y + 1}}}{y} \]
    10. Simplified58.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.02 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \]

Alternative 16: 80.5% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq -2.02 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x} - y\\

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


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

    1. Initial program 61.1%

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

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

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

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

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

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

    if -1 < x < -2.02e-84

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-151.7%

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

        \[\leadsto \color{blue}{\frac{y}{x} + \left(-y\right)} \]
      3. unsub-neg51.7%

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified51.7%

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

    if -2.02e-84 < x

    1. Initial program 75.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.02 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]

Alternative 17: 81.3% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.65 \cdot 10^{-89}:\\ \;\;\;\;\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 -1.85e+160)
   (* (/ y x) (/ 1.0 x))
   (if (<= x -2.65e-89) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0))))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -1.85e+160) {
		tmp = (y / x) * (1.0 / x);
	} else if (x <= -2.65e-89) {
		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 <= (-1.85d+160)) then
        tmp = (y / x) * (1.0d0 / x)
    else if (x <= (-2.65d-89)) 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 <= -1.85e+160) {
		tmp = (y / x) * (1.0 / x);
	} else if (x <= -2.65e-89) {
		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 <= -1.85e+160:
		tmp = (y / x) * (1.0 / x)
	elif x <= -2.65e-89:
		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 <= -1.85e+160)
		tmp = Float64(Float64(y / x) * Float64(1.0 / x));
	elseif (x <= -2.65e-89)
		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 <= -1.85e+160)
		tmp = (y / x) * (1.0 / x);
	elseif (x <= -2.65e-89)
		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, -1.85e+160], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.65e-89], 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 -1.85 \cdot 10^{+160}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\

\mathbf{elif}\;x \leq -2.65 \cdot 10^{-89}:\\
\;\;\;\;\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 < -1.85000000000000008e160

    1. Initial program 59.0%

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

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

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

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

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

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

    if -1.85000000000000008e160 < x < -2.65e-89

    1. Initial program 71.2%

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

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

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

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

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

    if -2.65e-89 < x

    1. Initial program 75.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.65 \cdot 10^{-89}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]

Alternative 18: 81.1% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq -2.02 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.00000000000000001e160

    1. Initial program 59.0%

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

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

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

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

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

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

    if -2.00000000000000001e160 < x < -2.02e-84

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\color{blue}{x} + x \cdot x} \]
    10. Simplified60.9%

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

    if -2.02e-84 < x

    1. Initial program 75.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.02 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{x + x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]

Alternative 19: 82.2% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq -2 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.4999999999999998e160

    1. Initial program 59.0%

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

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

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

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

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

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

    if -4.4999999999999998e160 < x < -2.0000000000000001e-84

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\color{blue}{x} + x \cdot x} \]
    10. Simplified60.9%

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

    if -2.0000000000000001e-84 < x

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y + 1}} \]
    10. Simplified58.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{x + x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \]

Alternative 20: 82.2% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq -2.02 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.2499999999999999e160

    1. Initial program 59.0%

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

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

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

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

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

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

    if -2.2499999999999999e160 < x < -2.02e-84

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(y + x\right) + 1} \]
      10. +-commutative94.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+94.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Step-by-step derivation
      1. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    5. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      2. *-rgt-identity99.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
    7. Simplified99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    8. Taylor expanded in y around 0 60.8%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    9. Step-by-step derivation
      1. distribute-rgt-in60.9%

        \[\leadsto \frac{y}{\color{blue}{1 \cdot x + x \cdot x}} \]
      2. *-lft-identity60.9%

        \[\leadsto \frac{y}{\color{blue}{x} + x \cdot x} \]
    10. Simplified60.9%

      \[\leadsto \color{blue}{\frac{y}{x + x \cdot x}} \]

    if -2.02e-84 < x

    1. Initial program 75.7%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac90.5%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+90.5%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 58.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative58.1%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified58.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    7. Step-by-step derivation
      1. *-un-lft-identity58.1%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot \left(y + 1\right)} \]
      2. times-frac58.7%

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
      3. +-commutative58.7%

        \[\leadsto \frac{1}{y} \cdot \frac{x}{\color{blue}{1 + y}} \]
    8. Applied egg-rr58.7%

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{1 + y}} \]
    9. Step-by-step derivation
      1. associate-*l/58.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{1 + y}}{y}} \]
      2. *-lft-identity58.8%

        \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y} \]
      3. +-commutative58.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + 1}}}{y} \]
    10. Simplified58.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + 1}}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{+160}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -2.02 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{x + x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \]

Alternative 21: 65.0% accurate, 1.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 5.5 \cdot 10^{-110}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 0.76:\\ \;\;\;\;\frac{x}{y} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y 5.5e-110) (/ y x) (if (<= y 0.76) (- (/ x y) x) (/ x (* y y)))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= 5.5e-110) {
		tmp = y / x;
	} else if (y <= 0.76) {
		tmp = (x / y) - x;
	} else {
		tmp = x / (y * y);
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 5.5d-110) then
        tmp = y / x
    else if (y <= 0.76d0) then
        tmp = (x / y) - x
    else
        tmp = x / (y * y)
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (y <= 5.5e-110) {
		tmp = y / x;
	} else if (y <= 0.76) {
		tmp = (x / y) - x;
	} else {
		tmp = x / (y * y);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if y <= 5.5e-110:
		tmp = y / x
	elif y <= 0.76:
		tmp = (x / y) - x
	else:
		tmp = x / (y * y)
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= 5.5e-110)
		tmp = Float64(y / x);
	elseif (y <= 0.76)
		tmp = Float64(Float64(x / y) - x);
	else
		tmp = Float64(x / Float64(y * y));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 5.5e-110)
		tmp = y / x;
	elseif (y <= 0.76)
		tmp = (x / y) - x;
	else
		tmp = x / (y * y);
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, 5.5e-110], N[(y / x), $MachinePrecision], If[LessEqual[y, 0.76], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{-110}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;y \leq 0.76:\\
\;\;\;\;\frac{x}{y} - x\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 5.4999999999999998e-110

    1. Initial program 75.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac90.3%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+90.3%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.3%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 56.2%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    5. Step-by-step derivation
      1. associate-/r*57.1%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative57.1%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    6. Simplified57.1%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]
    7. Taylor expanded in x around 0 16.3%

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-116.3%

        \[\leadsto \color{blue}{\left(-y\right)} + \frac{y}{x} \]
      2. +-commutative16.3%

        \[\leadsto \color{blue}{\frac{y}{x} + \left(-y\right)} \]
      3. unsub-neg16.3%

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified16.3%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Taylor expanded in x around 0 39.3%

      \[\leadsto \color{blue}{\frac{y}{x}} \]

    if 5.4999999999999998e-110 < y < 0.76000000000000001

    1. Initial program 82.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac99.5%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+99.5%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 48.7%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative48.7%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified48.7%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    7. Taylor expanded in y around 0 48.7%

      \[\leadsto \color{blue}{-1 \cdot x + \frac{x}{y}} \]
    8. Step-by-step derivation
      1. neg-mul-148.7%

        \[\leadsto \color{blue}{\left(-x\right)} + \frac{x}{y} \]
      2. +-commutative48.7%

        \[\leadsto \color{blue}{\frac{x}{y} + \left(-x\right)} \]
      3. unsub-neg48.7%

        \[\leadsto \color{blue}{\frac{x}{y} - x} \]
    9. Simplified48.7%

      \[\leadsto \color{blue}{\frac{x}{y} - x} \]

    if 0.76000000000000001 < y

    1. Initial program 62.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*68.0%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. +-commutative68.0%

        \[\leadsto \frac{\frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative68.0%

        \[\leadsto \frac{\frac{x \cdot y}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      4. +-commutative68.0%

        \[\leadsto \frac{\frac{x \cdot y}{\left(y + x\right) \cdot \left(y + x\right)}}{\color{blue}{\left(y + x\right)} + 1} \]
      5. associate-/r*62.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/75.8%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative75.8%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative75.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in71.9%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def75.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative75.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative75.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult75.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative75.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified75.8%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 64.8%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow264.8%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified64.8%

      \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.5 \cdot 10^{-110}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 0.76:\\ \;\;\;\;\frac{x}{y} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 22: 82.4% accurate, 1.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-85}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= x -4.5e-85) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -4.5e-85) {
		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.5d-85)) 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.5e-85) {
		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.5e-85:
		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.5e-85)
		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x / Float64(y + 1.0)) / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -4.5e-85)
		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.5e-85], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.50000000000000004e-85

    1. Initial program 66.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac87.0%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+87.0%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.0%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 66.0%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    5. Step-by-step derivation
      1. associate-/r*71.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative71.8%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    6. Simplified71.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]

    if -4.50000000000000004e-85 < x

    1. Initial program 75.7%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac90.5%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+90.5%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 58.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative58.1%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified58.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    7. Step-by-step derivation
      1. *-un-lft-identity58.1%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot \left(y + 1\right)} \]
      2. times-frac58.7%

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y + 1}} \]
      3. +-commutative58.7%

        \[\leadsto \frac{1}{y} \cdot \frac{x}{\color{blue}{1 + y}} \]
    8. Applied egg-rr58.7%

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{1 + y}} \]
    9. Step-by-step derivation
      1. associate-*l/58.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{1 + y}}{y}} \]
      2. *-lft-identity58.8%

        \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y} \]
      3. +-commutative58.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + 1}}}{y} \]
    10. Simplified58.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + 1}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-85}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y}\\ \end{array} \]

Alternative 23: 45.1% accurate, 3.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y) :precision binary64 (if (<= x -1.3e-118) (/ y x) (/ x y)))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (x <= -1.3e-118) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.3d-118)) then
        tmp = y / x
    else
        tmp = x / y
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.3e-118) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y):
	tmp = 0
	if x <= -1.3e-118:
		tmp = y / x
	else:
		tmp = x / y
	return tmp
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (x <= -1.3e-118)
		tmp = Float64(y / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.3e-118)
		tmp = y / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[x, -1.3e-118], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-118}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3e-118

    1. Initial program 69.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac88.1%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+88.1%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified88.1%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 60.3%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    5. Step-by-step derivation
      1. associate-/r*65.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative65.6%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    6. Simplified65.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]
    7. Taylor expanded in x around 0 11.0%

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    8. Step-by-step derivation
      1. neg-mul-111.0%

        \[\leadsto \color{blue}{\left(-y\right)} + \frac{y}{x} \]
      2. +-commutative11.0%

        \[\leadsto \color{blue}{\frac{y}{x} + \left(-y\right)} \]
      3. unsub-neg11.0%

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    9. Simplified11.0%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Taylor expanded in x around 0 30.7%

      \[\leadsto \color{blue}{\frac{y}{x}} \]

    if -1.3e-118 < x

    1. Initial program 74.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac90.1%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+90.1%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.1%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 56.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative56.1%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified56.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    7. Taylor expanded in y around 0 40.3%

      \[\leadsto \frac{x}{\color{blue}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{-118}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 24: 26.7% accurate, 5.7× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \frac{x}{y} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y) :precision binary64 (/ x y))
assert(x < y);
double code(double x, double y) {
	return x / y;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = x / y
end function
assert x < y;
public static double code(double x, double y) {
	return x / y;
}
[x, y] = sort([x, y])
def code(x, y):
	return x / y
x, y = sort([x, y])
function code(x, y)
	return Float64(x / y)
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
	tmp = x / y;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{x}{y}
\end{array}
Derivation
  1. Initial program 72.8%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac89.4%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. associate-+l+89.4%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified89.4%

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
  4. Taylor expanded in x around 0 48.1%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
  5. Step-by-step derivation
    1. +-commutative48.1%

      \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
  6. Simplified48.1%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  7. Taylor expanded in y around 0 28.3%

    \[\leadsto \frac{x}{\color{blue}{y}} \]
  8. Final simplification28.3%

    \[\leadsto \frac{x}{y} \]

Alternative 25: 3.8% accurate, 8.5× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ -y \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y) :precision binary64 (- y))
assert(x < y);
double code(double x, double y) {
	return -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 = -y
end function
assert x < y;
public static double code(double x, double y) {
	return -y;
}
[x, y] = sort([x, y])
def code(x, y):
	return -y
x, y = sort([x, y])
function code(x, y)
	return Float64(-y)
end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
	tmp = -y;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := (-y)
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
-y
\end{array}
Derivation
  1. Initial program 72.8%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac89.4%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. associate-+l+89.4%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified89.4%

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
  4. Taylor expanded in y around 0 48.0%

    \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
  5. Step-by-step derivation
    1. associate-/r*50.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
    2. +-commutative50.4%

      \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
  6. Simplified50.4%

    \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]
  7. Taylor expanded in x around 0 12.1%

    \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
  8. Step-by-step derivation
    1. neg-mul-112.1%

      \[\leadsto \color{blue}{\left(-y\right)} + \frac{y}{x} \]
    2. +-commutative12.1%

      \[\leadsto \color{blue}{\frac{y}{x} + \left(-y\right)} \]
    3. unsub-neg12.1%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]
  9. Simplified12.1%

    \[\leadsto \color{blue}{\frac{y}{x} - y} \]
  10. Taylor expanded in x around inf 3.6%

    \[\leadsto \color{blue}{-1 \cdot y} \]
  11. Step-by-step derivation
    1. neg-mul-13.6%

      \[\leadsto \color{blue}{-y} \]
  12. Simplified3.6%

    \[\leadsto \color{blue}{-y} \]
  13. Final simplification3.6%

    \[\leadsto -y \]

Developer target: 99.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y):
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y)
	return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x))))
end
function tmp = code(x, y)
	tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}

Reproduce

?
herbie shell --seed 2023293 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))

  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))