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

Percentage Accurate: 69.4% → 99.8%
Time: 10.2s
Alternatives: 22
Speedup: 1.6×

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

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

Initial Program: 69.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.0% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x - \frac{\mathsf{fma}\left(2, x, 1\right)}{y} \cdot x}{y}}{x + y}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
 :precision binary64
 (if (<= y -2.1e-62)
   (/ (/ (fma (fma 3.0 y 1.0) (/ (- y) x) y) x) x)
   (if (<= y 1.15e+106)
     (/ (* (/ x (+ x y)) y) (* (+ (+ x y) 1.0) (+ x y)))
     (/ (/ (- x (* (/ (fma 2.0 x 1.0) y) x)) y) (+ x y)))))
assert(x < y);
double code(double x, double y) {
	double tmp;
	if (y <= -2.1e-62) {
		tmp = (fma(fma(3.0, y, 1.0), (-y / x), y) / x) / x;
	} else if (y <= 1.15e+106) {
		tmp = ((x / (x + y)) * y) / (((x + y) + 1.0) * (x + y));
	} else {
		tmp = ((x - ((fma(2.0, x, 1.0) / y) * x)) / y) / (x + y);
	}
	return tmp;
}
x, y = sort([x, y])
function code(x, y)
	tmp = 0.0
	if (y <= -2.1e-62)
		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(Float64(-y) / x), y) / x) / x);
	elseif (y <= 1.15e+106)
		tmp = Float64(Float64(Float64(x / Float64(x + y)) * y) / Float64(Float64(Float64(x + y) + 1.0) * Float64(x + y)));
	else
		tmp = Float64(Float64(Float64(x - Float64(Float64(fma(2.0, x, 1.0) / y) * x)) / y) / Float64(x + y));
	end
	return tmp
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_] := If[LessEqual[y, -2.1e-62], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[((-y) / x), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 1.15e+106], N[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - N[(N[(N[(2.0 * x + 1.0), $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\

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

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


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

    1. Initial program 67.1%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(1 + \left(y + 2 \cdot y\right)\right)}{x}\right)\right)}}{x}}{x} \]
      6. unsub-negN/A

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

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

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

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

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

        \[\leadsto \frac{\frac{y - \frac{\color{blue}{\left(\left(y + 2 \cdot y\right) + 1\right)} \cdot y}{x}}{x}}{x} \]
      12. distribute-rgt1-inN/A

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

        \[\leadsto \frac{\frac{y - \frac{\left(\color{blue}{3} \cdot y + 1\right) \cdot y}{x}}{x}}{x} \]
      14. lower-fma.f6433.4

        \[\leadsto \frac{\frac{y - \frac{\color{blue}{\mathsf{fma}\left(3, y, 1\right)} \cdot y}{x}}{x}}{x} \]
    5. Applied rewrites33.4%

      \[\leadsto \color{blue}{\frac{\frac{y - \frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}}{x}}{x}} \]
    6. Step-by-step derivation
      1. Applied rewrites40.4%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), -\frac{y}{x}, y\right)}{x}}{x} \]

      if -2.0999999999999999e-62 < y < 1.1500000000000001e106

      1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{y + x} \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
        15. lower-*.f6499.2

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

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

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

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

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

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

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

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

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

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

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

      if 1.1500000000000001e106 < y

      1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
      6. Step-by-step derivation
        1. lower-/.f6414.2

          \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
      7. Applied rewrites14.2%

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

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

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

          \[\leadsto \frac{\frac{x + \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot \left(1 + 2 \cdot x\right)}{y}\right)\right)}}{y}}{y + x} \]
        3. unsub-negN/A

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

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

          \[\leadsto \frac{\frac{x - \color{blue}{x \cdot \frac{1 + 2 \cdot x}{y}}}{y}}{y + x} \]
        6. lower-*.f64N/A

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

          \[\leadsto \frac{\frac{x - x \cdot \color{blue}{\frac{1 + 2 \cdot x}{y}}}{y}}{y + x} \]
        8. +-commutativeN/A

          \[\leadsto \frac{\frac{x - x \cdot \frac{\color{blue}{2 \cdot x + 1}}{y}}{y}}{y + x} \]
        9. lower-fma.f6488.0

          \[\leadsto \frac{\frac{x - x \cdot \frac{\color{blue}{\mathsf{fma}\left(2, x, 1\right)}}{y}}{y}}{y + x} \]
      10. Applied rewrites88.0%

        \[\leadsto \frac{\color{blue}{\frac{x - x \cdot \frac{\mathsf{fma}\left(2, x, 1\right)}{y}}{y}}}{y + x} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification80.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x - \frac{\mathsf{fma}\left(2, x, 1\right)}{y} \cdot x}{y}}{x + y}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 96.6% accurate, 0.6× speedup?

    \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \frac{x}{x + y}\\ \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 6.3 \cdot 10^{+131}:\\ \;\;\;\;\frac{t\_0 \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{\mathsf{fma}\left(2, x, 1\right)}{y}}{y} \cdot 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 (+ x y))))
       (if (<= y -2.1e-62)
         (/ (/ (fma (fma 3.0 y 1.0) (/ (- y) x) y) x) x)
         (if (<= y 6.3e+131)
           (/ (* t_0 y) (* (+ (+ x y) 1.0) (+ x y)))
           (* (/ (- 1.0 (/ (fma 2.0 x 1.0) y)) y) t_0)))))
    assert(x < y);
    double code(double x, double y) {
    	double t_0 = x / (x + y);
    	double tmp;
    	if (y <= -2.1e-62) {
    		tmp = (fma(fma(3.0, y, 1.0), (-y / x), y) / x) / x;
    	} else if (y <= 6.3e+131) {
    		tmp = (t_0 * y) / (((x + y) + 1.0) * (x + y));
    	} else {
    		tmp = ((1.0 - (fma(2.0, x, 1.0) / y)) / y) * t_0;
    	}
    	return tmp;
    }
    
    x, y = sort([x, y])
    function code(x, y)
    	t_0 = Float64(x / Float64(x + y))
    	tmp = 0.0
    	if (y <= -2.1e-62)
    		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(Float64(-y) / x), y) / x) / x);
    	elseif (y <= 6.3e+131)
    		tmp = Float64(Float64(t_0 * y) / Float64(Float64(Float64(x + y) + 1.0) * Float64(x + y)));
    	else
    		tmp = Float64(Float64(Float64(1.0 - Float64(fma(2.0, x, 1.0) / y)) / y) * t_0);
    	end
    	return 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[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e-62], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[((-y) / x), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 6.3e+131], N[(N[(t$95$0 * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - N[(N[(2.0 * x + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
    
    \begin{array}{l}
    [x, y] = \mathsf{sort}([x, y])\\
    \\
    \begin{array}{l}
    t_0 := \frac{x}{x + y}\\
    \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\
    \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\
    
    \mathbf{elif}\;y \leq 6.3 \cdot 10^{+131}:\\
    \;\;\;\;\frac{t\_0 \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1 - \frac{\mathsf{fma}\left(2, x, 1\right)}{y}}{y} \cdot t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -2.0999999999999999e-62

      1. Initial program 67.1%

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

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

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

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

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

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

          \[\leadsto \frac{\frac{y + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(1 + \left(y + 2 \cdot y\right)\right)}{x}\right)\right)}}{x}}{x} \]
        6. unsub-negN/A

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

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

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

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

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

          \[\leadsto \frac{\frac{y - \frac{\color{blue}{\left(\left(y + 2 \cdot y\right) + 1\right)} \cdot y}{x}}{x}}{x} \]
        12. distribute-rgt1-inN/A

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

          \[\leadsto \frac{\frac{y - \frac{\left(\color{blue}{3} \cdot y + 1\right) \cdot y}{x}}{x}}{x} \]
        14. lower-fma.f6433.4

          \[\leadsto \frac{\frac{y - \frac{\color{blue}{\mathsf{fma}\left(3, y, 1\right)} \cdot y}{x}}{x}}{x} \]
      5. Applied rewrites33.4%

        \[\leadsto \color{blue}{\frac{\frac{y - \frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}}{x}}{x}} \]
      6. Step-by-step derivation
        1. Applied rewrites40.4%

          \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), -\frac{y}{x}, y\right)}{x}}{x} \]

        if -2.0999999999999999e-62 < y < 6.29999999999999996e131

        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. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{x}{y + x} \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
          15. lower-*.f6499.2

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

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

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

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

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

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

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

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

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

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

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

        if 6.29999999999999996e131 < y

        1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{y}{\left(1 + \left(y + x\right)\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{x}{x + y} \]
          22. lower-/.f6475.6

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{1 + -1 \cdot \frac{1 + 2 \cdot x}{y}}{y}} \cdot \frac{x}{y + x} \]
          2. mul-1-negN/A

            \[\leadsto \frac{1 + \color{blue}{\left(\mathsf{neg}\left(\frac{1 + 2 \cdot x}{y}\right)\right)}}{y} \cdot \frac{x}{y + x} \]
          3. unsub-negN/A

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

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

            \[\leadsto \frac{1 - \color{blue}{\frac{1 + 2 \cdot x}{y}}}{y} \cdot \frac{x}{y + x} \]
          6. +-commutativeN/A

            \[\leadsto \frac{1 - \frac{\color{blue}{2 \cdot x + 1}}{y}}{y} \cdot \frac{x}{y + x} \]
          7. lower-fma.f6486.4

            \[\leadsto \frac{1 - \frac{\color{blue}{\mathsf{fma}\left(2, x, 1\right)}}{y}}{y} \cdot \frac{x}{y + x} \]
        7. Applied rewrites86.4%

          \[\leadsto \color{blue}{\frac{1 - \frac{\mathsf{fma}\left(2, x, 1\right)}{y}}{y}} \cdot \frac{x}{y + x} \]
      7. Recombined 3 regimes into one program.
      8. Final simplification80.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 6.3 \cdot 10^{+131}:\\ \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{\mathsf{fma}\left(2, x, 1\right)}{y}}{y} \cdot \frac{x}{x + y}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 95.9% accurate, 0.6× speedup?

      \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_0 := \left(x + y\right) + 1\\ \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{t\_0 \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y} \cdot \frac{y}{t\_0}}{x + y}\\ \end{array} \end{array} \]
      NOTE: x and y should be sorted in increasing order before calling this function.
      (FPCore (x y)
       :precision binary64
       (let* ((t_0 (+ (+ x y) 1.0)))
         (if (<= y -2.1e-62)
           (/ (/ (fma (fma 3.0 y 1.0) (/ (- y) x) y) x) x)
           (if (<= y 1.15e+106)
             (/ (* (/ x (+ x y)) y) (* t_0 (+ x y)))
             (/ (* (/ x y) (/ y t_0)) (+ x y))))))
      assert(x < y);
      double code(double x, double y) {
      	double t_0 = (x + y) + 1.0;
      	double tmp;
      	if (y <= -2.1e-62) {
      		tmp = (fma(fma(3.0, y, 1.0), (-y / x), y) / x) / x;
      	} else if (y <= 1.15e+106) {
      		tmp = ((x / (x + y)) * y) / (t_0 * (x + y));
      	} else {
      		tmp = ((x / y) * (y / t_0)) / (x + y);
      	}
      	return tmp;
      }
      
      x, y = sort([x, y])
      function code(x, y)
      	t_0 = Float64(Float64(x + y) + 1.0)
      	tmp = 0.0
      	if (y <= -2.1e-62)
      		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(Float64(-y) / x), y) / x) / x);
      	elseif (y <= 1.15e+106)
      		tmp = Float64(Float64(Float64(x / Float64(x + y)) * y) / Float64(t_0 * Float64(x + y)));
      	else
      		tmp = Float64(Float64(Float64(x / y) * Float64(y / t_0)) / Float64(x + y));
      	end
      	return tmp
      end
      
      NOTE: x and y should be sorted in increasing order before calling this function.
      code[x_, y_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[y, -2.1e-62], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[((-y) / x), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 1.15e+106], N[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / N[(t$95$0 * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / y), $MachinePrecision] * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      [x, y] = \mathsf{sort}([x, y])\\
      \\
      \begin{array}{l}
      t_0 := \left(x + y\right) + 1\\
      \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\
      \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\
      
      \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\
      \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{t\_0 \cdot \left(x + y\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{y} \cdot \frac{y}{t\_0}}{x + y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -2.0999999999999999e-62

        1. Initial program 67.1%

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

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

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

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

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

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

            \[\leadsto \frac{\frac{y + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(1 + \left(y + 2 \cdot y\right)\right)}{x}\right)\right)}}{x}}{x} \]
          6. unsub-negN/A

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

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

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

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

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

            \[\leadsto \frac{\frac{y - \frac{\color{blue}{\left(\left(y + 2 \cdot y\right) + 1\right)} \cdot y}{x}}{x}}{x} \]
          12. distribute-rgt1-inN/A

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

            \[\leadsto \frac{\frac{y - \frac{\left(\color{blue}{3} \cdot y + 1\right) \cdot y}{x}}{x}}{x} \]
          14. lower-fma.f6433.4

            \[\leadsto \frac{\frac{y - \frac{\color{blue}{\mathsf{fma}\left(3, y, 1\right)} \cdot y}{x}}{x}}{x} \]
        5. Applied rewrites33.4%

          \[\leadsto \color{blue}{\frac{\frac{y - \frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}}{x}}{x}} \]
        6. Step-by-step derivation
          1. Applied rewrites40.4%

            \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), -\frac{y}{x}, y\right)}{x}}{x} \]

          if -2.0999999999999999e-62 < y < 1.1500000000000001e106

          1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{x}{y + x} \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
            15. lower-*.f6499.2

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

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

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

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

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

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

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

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

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

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

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

          if 1.1500000000000001e106 < y

          1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 5: 95.9% accurate, 0.7× speedup?

        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\ \end{array} \end{array} \]
        NOTE: x and y should be sorted in increasing order before calling this function.
        (FPCore (x y)
         :precision binary64
         (if (<= y -2.1e-62)
           (/ (/ (fma (fma 3.0 y 1.0) (/ (- y) x) y) x) x)
           (if (<= y 1.15e+106)
             (/ (* (/ x (+ x y)) y) (* (+ (+ x y) 1.0) (+ x y)))
             (/ (/ x (+ 1.0 y)) (+ x y)))))
        assert(x < y);
        double code(double x, double y) {
        	double tmp;
        	if (y <= -2.1e-62) {
        		tmp = (fma(fma(3.0, y, 1.0), (-y / x), y) / x) / x;
        	} else if (y <= 1.15e+106) {
        		tmp = ((x / (x + y)) * y) / (((x + y) + 1.0) * (x + y));
        	} else {
        		tmp = (x / (1.0 + y)) / (x + y);
        	}
        	return tmp;
        }
        
        x, y = sort([x, y])
        function code(x, y)
        	tmp = 0.0
        	if (y <= -2.1e-62)
        		tmp = Float64(Float64(fma(fma(3.0, y, 1.0), Float64(Float64(-y) / x), y) / x) / x);
        	elseif (y <= 1.15e+106)
        		tmp = Float64(Float64(Float64(x / Float64(x + y)) * y) / Float64(Float64(Float64(x + y) + 1.0) * Float64(x + y)));
        	else
        		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(x + y));
        	end
        	return tmp
        end
        
        NOTE: x and y should be sorted in increasing order before calling this function.
        code[x_, y_] := If[LessEqual[y, -2.1e-62], N[(N[(N[(N[(3.0 * y + 1.0), $MachinePrecision] * N[((-y) / x), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 1.15e+106], N[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        [x, y] = \mathsf{sort}([x, y])\\
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\
        \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\
        
        \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\
        \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -2.0999999999999999e-62

          1. Initial program 67.1%

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

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

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

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

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

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

              \[\leadsto \frac{\frac{y + \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(1 + \left(y + 2 \cdot y\right)\right)}{x}\right)\right)}}{x}}{x} \]
            6. unsub-negN/A

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

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

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

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

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

              \[\leadsto \frac{\frac{y - \frac{\color{blue}{\left(\left(y + 2 \cdot y\right) + 1\right)} \cdot y}{x}}{x}}{x} \]
            12. distribute-rgt1-inN/A

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

              \[\leadsto \frac{\frac{y - \frac{\left(\color{blue}{3} \cdot y + 1\right) \cdot y}{x}}{x}}{x} \]
            14. lower-fma.f6433.4

              \[\leadsto \frac{\frac{y - \frac{\color{blue}{\mathsf{fma}\left(3, y, 1\right)} \cdot y}{x}}{x}}{x} \]
          5. Applied rewrites33.4%

            \[\leadsto \color{blue}{\frac{\frac{y - \frac{\mathsf{fma}\left(3, y, 1\right) \cdot y}{x}}{x}}{x}} \]
          6. Step-by-step derivation
            1. Applied rewrites40.4%

              \[\leadsto \frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), -\frac{y}{x}, y\right)}{x}}{x} \]

            if -2.0999999999999999e-62 < y < 1.1500000000000001e106

            1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\frac{x}{y + x} \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
              15. lower-*.f6499.2

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

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

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

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

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

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

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

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

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

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

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

            if 1.1500000000000001e106 < y

            1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
              2. lower-+.f6487.9

                \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
            7. Applied rewrites87.9%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(3, y, 1\right), \frac{-y}{x}, y\right)}{x}}{x}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{x}{x + y} \cdot y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 6: 96.1% accurate, 0.7× speedup?

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

            1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -5.7999999999999995e-63 < y < 1.1500000000000001e106

              1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\frac{x}{y + x} \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
                15. lower-*.f6499.2

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

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

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

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

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

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

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

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

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

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

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

              if 1.1500000000000001e106 < y

              1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                2. lower-+.f6487.9

                  \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
              7. Applied rewrites87.9%

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

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

            Alternative 7: 96.7% accurate, 0.7× speedup?

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

              1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -5.7999999999999995e-63 < y < 5.3e132

                1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{y}{y + x} \cdot \frac{x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
                  15. lower-*.f6499.2

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

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

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

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

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

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

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

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

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

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

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

                if 5.3e132 < y

                1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                7. Applied rewrites85.8%

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

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

              Alternative 8: 96.1% accurate, 0.7× speedup?

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

                1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -5.7999999999999995e-63 < y < 1.1500000000000001e106

                  1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y}{\left(1 + \left(y + x\right)\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{x}{x + y} \]
                    22. lower-/.f6499.2

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

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

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

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

                  if 1.1500000000000001e106 < y

                  1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                    2. lower-+.f6487.9

                      \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                  7. Applied rewrites87.9%

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

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

                Alternative 9: 93.0% accurate, 0.7× speedup?

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

                  1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.6500000000000001e-11 < x < 3.00000000000000016e-87

                    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\frac{x}{y + x} \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)}} \]
                      15. lower-*.f6499.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 3.00000000000000016e-87 < x

                    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                    7. Applied rewrites31.8%

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

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

                  Alternative 10: 92.9% accurate, 0.7× speedup?

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

                    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -1.6500000000000001e-11 < x < 1e-203

                      1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{y}{\left(1 + \left(y + x\right)\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{x}{x + y} \]
                        22. lower-/.f6499.8

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

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

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

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

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

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

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

                      if 1e-203 < x

                      1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                        2. lower-+.f6441.2

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

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

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

                    Alternative 11: 88.2% accurate, 0.8× speedup?

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

                      1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.64999999999999998e-144 < y < 1.45000000000000007e91

                        1. Initial program 85.7%

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

                        if 1.45000000000000007e91 < y

                        1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                          2. lower-+.f6487.3

                            \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                        7. Applied rewrites87.3%

                          \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                      7. Recombined 3 regimes into one program.
                      8. Final simplification72.5%

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

                      Alternative 12: 86.0% accurate, 0.8× speedup?

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

                        1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 1.64999999999999998e-144 < y < 1.19999999999999996

                          1. Initial program 86.4%

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

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

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

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

                          if 1.19999999999999996 < y

                          1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                            2. lower-+.f6478.4

                              \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                          7. Applied rewrites78.4%

                            \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                        7. Recombined 3 regimes into one program.
                        8. Final simplification70.0%

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

                        Alternative 13: 85.9% accurate, 0.8× speedup?

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

                          1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
                          7. Applied rewrites62.8%

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

                          if 1.64999999999999998e-144 < y < 1.19999999999999996

                          1. Initial program 86.4%

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

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

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

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

                          if 1.19999999999999996 < y

                          1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                            2. lower-+.f6478.4

                              \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                          7. Applied rewrites78.4%

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

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

                        Alternative 14: 81.4% accurate, 1.0× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + y}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-95}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\ \end{array} \end{array} \]
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        (FPCore (x y)
                         :precision binary64
                         (if (<= y -2.1e-62)
                           (/ (/ y x) (+ x y))
                           (if (<= y 2.1e-95) (/ y (fma x x x)) (/ (/ x (+ 1.0 y)) (+ x y)))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (y <= -2.1e-62) {
                        		tmp = (y / x) / (x + y);
                        	} else if (y <= 2.1e-95) {
                        		tmp = y / fma(x, x, x);
                        	} else {
                        		tmp = (x / (1.0 + y)) / (x + y);
                        	}
                        	return tmp;
                        }
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (y <= -2.1e-62)
                        		tmp = Float64(Float64(y / x) / Float64(x + y));
                        	elseif (y <= 2.1e-95)
                        		tmp = Float64(y / fma(x, x, x));
                        	else
                        		tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(x + y));
                        	end
                        	return tmp
                        end
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        code[x_, y_] := If[LessEqual[y, -2.1e-62], N[(N[(y / x), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-95], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\
                        \;\;\;\;\frac{\frac{y}{x}}{x + y}\\
                        
                        \mathbf{elif}\;y \leq 2.1 \cdot 10^{-95}:\\
                        \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if y < -2.0999999999999999e-62

                          1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
                          6. Step-by-step derivation
                            1. lower-/.f6440.6

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

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

                          if -2.0999999999999999e-62 < y < 2.1e-95

                          1. Initial program 74.0%

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

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

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

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

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

                              \[\leadsto \frac{y}{x \cdot x + \color{blue}{x}} \]
                            5. lower-fma.f6482.8

                              \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}} \]
                          5. Applied rewrites82.8%

                            \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, x, x\right)}} \]

                          if 2.1e-95 < y

                          1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                            2. lower-+.f6470.3

                              \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                          7. Applied rewrites70.3%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + y}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-95}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 15: 79.7% accurate, 1.1× speedup?

                        \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + y}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+18}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        (FPCore (x y)
                         :precision binary64
                         (if (<= y -2.1e-62)
                           (/ (/ y x) (+ x y))
                           (if (<= y 2.7e+18) (/ y (fma x x x)) (/ (/ x y) y))))
                        assert(x < y);
                        double code(double x, double y) {
                        	double tmp;
                        	if (y <= -2.1e-62) {
                        		tmp = (y / x) / (x + y);
                        	} else if (y <= 2.7e+18) {
                        		tmp = y / fma(x, x, x);
                        	} else {
                        		tmp = (x / y) / y;
                        	}
                        	return tmp;
                        }
                        
                        x, y = sort([x, y])
                        function code(x, y)
                        	tmp = 0.0
                        	if (y <= -2.1e-62)
                        		tmp = Float64(Float64(y / x) / Float64(x + y));
                        	elseif (y <= 2.7e+18)
                        		tmp = Float64(y / fma(x, x, x));
                        	else
                        		tmp = Float64(Float64(x / y) / y);
                        	end
                        	return tmp
                        end
                        
                        NOTE: x and y should be sorted in increasing order before calling this function.
                        code[x_, y_] := If[LessEqual[y, -2.1e-62], N[(N[(y / x), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+18], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        [x, y] = \mathsf{sort}([x, y])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\
                        \;\;\;\;\frac{\frac{y}{x}}{x + y}\\
                        
                        \mathbf{elif}\;y \leq 2.7 \cdot 10^{+18}:\\
                        \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\frac{x}{y}}{y}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if y < -2.0999999999999999e-62

                          1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{y + x} \]
                          6. Step-by-step derivation
                            1. lower-/.f6440.6

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

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

                          if -2.0999999999999999e-62 < y < 2.7e18

                          1. Initial program 75.0%

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

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

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

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

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

                              \[\leadsto \frac{y}{x \cdot x + \color{blue}{x}} \]
                            5. lower-fma.f6479.2

                              \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}} \]
                          5. Applied rewrites79.2%

                            \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, x, x\right)}} \]

                          if 2.7e18 < y

                          1. Initial program 56.7%

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

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

                              \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                            2. unpow2N/A

                              \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                            3. lower-*.f6475.3

                              \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                          5. Applied rewrites75.3%

                            \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
                          6. Step-by-step derivation
                            1. Applied rewrites83.4%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + y}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+18}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]
                          9. Add Preprocessing

                          Alternative 16: 79.7% accurate, 1.1× speedup?

                          \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+18}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
                          NOTE: x and y should be sorted in increasing order before calling this function.
                          (FPCore (x y)
                           :precision binary64
                           (if (<= y -2.1e-62)
                             (/ (/ y x) x)
                             (if (<= y 2.7e+18) (/ y (fma x x x)) (/ (/ x y) y))))
                          assert(x < y);
                          double code(double x, double y) {
                          	double tmp;
                          	if (y <= -2.1e-62) {
                          		tmp = (y / x) / x;
                          	} else if (y <= 2.7e+18) {
                          		tmp = y / fma(x, x, x);
                          	} else {
                          		tmp = (x / y) / y;
                          	}
                          	return tmp;
                          }
                          
                          x, y = sort([x, y])
                          function code(x, y)
                          	tmp = 0.0
                          	if (y <= -2.1e-62)
                          		tmp = Float64(Float64(y / x) / x);
                          	elseif (y <= 2.7e+18)
                          		tmp = Float64(y / fma(x, x, x));
                          	else
                          		tmp = Float64(Float64(x / y) / y);
                          	end
                          	return tmp
                          end
                          
                          NOTE: x and y should be sorted in increasing order before calling this function.
                          code[x_, y_] := If[LessEqual[y, -2.1e-62], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 2.7e+18], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          [x, y] = \mathsf{sort}([x, y])\\
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;y \leq -2.1 \cdot 10^{-62}:\\
                          \;\;\;\;\frac{\frac{y}{x}}{x}\\
                          
                          \mathbf{elif}\;y \leq 2.7 \cdot 10^{+18}:\\
                          \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\frac{x}{y}}{y}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if y < -2.0999999999999999e-62

                            1. Initial program 67.1%

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

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

                                \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                              2. unpow2N/A

                                \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
                              3. lower-*.f6436.0

                                \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
                            5. Applied rewrites36.0%

                              \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]
                            6. Step-by-step derivation
                              1. Applied rewrites39.9%

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

                              if -2.0999999999999999e-62 < y < 2.7e18

                              1. Initial program 75.0%

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

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

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

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

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

                                  \[\leadsto \frac{y}{x \cdot x + \color{blue}{x}} \]
                                5. lower-fma.f6479.2

                                  \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}} \]
                              5. Applied rewrites79.2%

                                \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, x, x\right)}} \]

                              if 2.7e18 < y

                              1. Initial program 56.7%

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

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

                                  \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                                2. unpow2N/A

                                  \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                3. lower-*.f6475.3

                                  \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                              5. Applied rewrites75.3%

                                \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
                              6. Step-by-step derivation
                                1. Applied rewrites83.4%

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

                              Alternative 17: 81.7% accurate, 1.1× speedup?

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

                                1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\frac{y}{\color{blue}{1 + x}}}{y + x} \]
                                7. Applied rewrites65.0%

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

                                if 2.1e-95 < y

                                1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
                                  2. lower-+.f6470.3

                                    \[\leadsto \frac{\frac{x}{\color{blue}{1 + y}}}{y + x} \]
                                7. Applied rewrites70.3%

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

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

                              Alternative 18: 78.5% accurate, 1.3× speedup?

                              \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 2.7 \cdot 10^{+18}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
                              NOTE: x and y should be sorted in increasing order before calling this function.
                              (FPCore (x y)
                               :precision binary64
                               (if (<= y 2.7e+18) (/ y (fma x x x)) (/ (/ x y) y)))
                              assert(x < y);
                              double code(double x, double y) {
                              	double tmp;
                              	if (y <= 2.7e+18) {
                              		tmp = y / fma(x, x, x);
                              	} else {
                              		tmp = (x / y) / y;
                              	}
                              	return tmp;
                              }
                              
                              x, y = sort([x, y])
                              function code(x, y)
                              	tmp = 0.0
                              	if (y <= 2.7e+18)
                              		tmp = Float64(y / fma(x, x, x));
                              	else
                              		tmp = Float64(Float64(x / y) / y);
                              	end
                              	return tmp
                              end
                              
                              NOTE: x and y should be sorted in increasing order before calling this function.
                              code[x_, y_] := If[LessEqual[y, 2.7e+18], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]
                              
                              \begin{array}{l}
                              [x, y] = \mathsf{sort}([x, y])\\
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;y \leq 2.7 \cdot 10^{+18}:\\
                              \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{\frac{x}{y}}{y}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if y < 2.7e18

                                1. Initial program 72.1%

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

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

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

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

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

                                    \[\leadsto \frac{y}{x \cdot x + \color{blue}{x}} \]
                                  5. lower-fma.f6463.4

                                    \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}} \]
                                5. Applied rewrites63.4%

                                  \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, x, x\right)}} \]

                                if 2.7e18 < y

                                1. Initial program 56.7%

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

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

                                    \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                                  2. unpow2N/A

                                    \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                  3. lower-*.f6475.3

                                    \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                5. Applied rewrites75.3%

                                  \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites83.4%

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

                                Alternative 19: 78.0% accurate, 1.6× speedup?

                                \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 2.1 \cdot 10^{-95}:\\ \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\ \end{array} \end{array} \]
                                NOTE: x and y should be sorted in increasing order before calling this function.
                                (FPCore (x y)
                                 :precision binary64
                                 (if (<= y 2.1e-95) (/ y (fma x x x)) (/ x (fma y y y))))
                                assert(x < y);
                                double code(double x, double y) {
                                	double tmp;
                                	if (y <= 2.1e-95) {
                                		tmp = y / fma(x, x, x);
                                	} else {
                                		tmp = x / fma(y, y, y);
                                	}
                                	return tmp;
                                }
                                
                                x, y = sort([x, y])
                                function code(x, y)
                                	tmp = 0.0
                                	if (y <= 2.1e-95)
                                		tmp = Float64(y / fma(x, x, x));
                                	else
                                		tmp = Float64(x / fma(y, y, y));
                                	end
                                	return tmp
                                end
                                
                                NOTE: x and y should be sorted in increasing order before calling this function.
                                code[x_, y_] := If[LessEqual[y, 2.1e-95], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                [x, y] = \mathsf{sort}([x, y])\\
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;y \leq 2.1 \cdot 10^{-95}:\\
                                \;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if y < 2.1e-95

                                  1. Initial program 71.1%

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

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

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

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

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

                                      \[\leadsto \frac{y}{x \cdot x + \color{blue}{x}} \]
                                    5. lower-fma.f6463.0

                                      \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, x, x\right)}} \]
                                  5. Applied rewrites63.0%

                                    \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, x, x\right)}} \]

                                  if 2.1e-95 < y

                                  1. Initial program 63.0%

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

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

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

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

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

                                      \[\leadsto \frac{x}{y \cdot y + \color{blue}{y}} \]
                                    5. lower-fma.f6464.1

                                      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, y, y\right)}} \]
                                  5. Applied rewrites64.1%

                                    \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(y, y, y\right)}} \]
                                3. Recombined 2 regimes into one program.
                                4. Add Preprocessing

                                Alternative 20: 76.5% accurate, 1.6× speedup?

                                \[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -350000000:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\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 -350000000.0) (/ y (* x x)) (/ x (fma y y y))))
                                assert(x < y);
                                double code(double x, double y) {
                                	double tmp;
                                	if (x <= -350000000.0) {
                                		tmp = y / (x * x);
                                	} else {
                                		tmp = x / fma(y, y, y);
                                	}
                                	return tmp;
                                }
                                
                                x, y = sort([x, y])
                                function code(x, y)
                                	tmp = 0.0
                                	if (x <= -350000000.0)
                                		tmp = Float64(y / Float64(x * x));
                                	else
                                		tmp = Float64(x / fma(y, y, y));
                                	end
                                	return tmp
                                end
                                
                                NOTE: x and y should be sorted in increasing order before calling this function.
                                code[x_, y_] := If[LessEqual[x, -350000000.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                [x, y] = \mathsf{sort}([x, y])\\
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;x \leq -350000000:\\
                                \;\;\;\;\frac{y}{x \cdot x}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x < -3.5e8

                                  1. Initial program 62.6%

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

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

                                      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                                    2. unpow2N/A

                                      \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
                                    3. lower-*.f6475.5

                                      \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
                                  5. Applied rewrites75.5%

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

                                  if -3.5e8 < x

                                  1. Initial program 70.3%

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

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

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

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

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

                                      \[\leadsto \frac{x}{y \cdot y + \color{blue}{y}} \]
                                    5. lower-fma.f6455.8

                                      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, y, y\right)}} \]
                                  5. Applied rewrites55.8%

                                    \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(y, y, y\right)}} \]
                                3. Recombined 2 regimes into one program.
                                4. Add Preprocessing

                                Alternative 21: 63.6% accurate, 1.7× speedup?

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

                                  1. Initial program 72.1%

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

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

                                      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
                                    2. unpow2N/A

                                      \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
                                    3. lower-*.f6448.1

                                      \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
                                  5. Applied rewrites48.1%

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

                                  if 2.7e18 < y

                                  1. Initial program 56.7%

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

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

                                      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                                    2. unpow2N/A

                                      \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                    3. lower-*.f6475.3

                                      \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                  5. Applied rewrites75.3%

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

                                Alternative 22: 36.6% accurate, 2.3× speedup?

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

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

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

                                    \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
                                  2. unpow2N/A

                                    \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                  3. lower-*.f6434.2

                                    \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
                                5. Applied rewrites34.2%

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

                                Developer Target 1: 99.8% accurate, 0.6× 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 2024296 
                                (FPCore (x y)
                                  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
                                  :precision binary64
                                
                                  :alt
                                  (! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))
                                
                                  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))