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

Percentage Accurate: 68.8% → 99.8%
Time: 15.1s
Alternatives: 18
Speedup: 1.0×

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

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

Initial Program: 68.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

\\
\frac{\frac{y \cdot \frac{x}{y + x}}{x + \left(y + 1\right)}}{y + x}
\end{array}
Derivation
  1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    2. cube-mult55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 69.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;x \leq -5.6 \cdot 10^{+171}:\\ \;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-148}:\\ \;\;\;\;x \cdot \frac{y}{\left(y + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (+ x (+ y 1.0))))
   (if (<= x -5.6e+171)
     (/ (/ y t_0) (+ x (* y 2.0)))
     (if (<= x -4e-13)
       (/ y (* (+ y x) t_0))
       (if (<= x -4e-148)
         (* x (/ y (* (+ y 1.0) (* (+ y x) (+ y x)))))
         (/ (/ x y) (+ y 1.0)))))))
double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -5.6e+171) {
		tmp = (y / t_0) / (x + (y * 2.0));
	} else if (x <= -4e-13) {
		tmp = y / ((y + x) * t_0);
	} else if (x <= -4e-148) {
		tmp = x * (y / ((y + 1.0) * ((y + x) * (y + x))));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
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 (x <= (-5.6d+171)) then
        tmp = (y / t_0) / (x + (y * 2.0d0))
    else if (x <= (-4d-13)) then
        tmp = y / ((y + x) * t_0)
    else if (x <= (-4d-148)) then
        tmp = x * (y / ((y + 1.0d0) * ((y + x) * (y + x))))
    else
        tmp = (x / y) / (y + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -5.6e+171) {
		tmp = (y / t_0) / (x + (y * 2.0));
	} else if (x <= -4e-13) {
		tmp = y / ((y + x) * t_0);
	} else if (x <= -4e-148) {
		tmp = x * (y / ((y + 1.0) * ((y + x) * (y + x))));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	t_0 = x + (y + 1.0)
	tmp = 0
	if x <= -5.6e+171:
		tmp = (y / t_0) / (x + (y * 2.0))
	elif x <= -4e-13:
		tmp = y / ((y + x) * t_0)
	elif x <= -4e-148:
		tmp = x * (y / ((y + 1.0) * ((y + x) * (y + x))))
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	t_0 = Float64(x + Float64(y + 1.0))
	tmp = 0.0
	if (x <= -5.6e+171)
		tmp = Float64(Float64(y / t_0) / Float64(x + Float64(y * 2.0)));
	elseif (x <= -4e-13)
		tmp = Float64(y / Float64(Float64(y + x) * t_0));
	elseif (x <= -4e-148)
		tmp = Float64(x * Float64(y / Float64(Float64(y + 1.0) * Float64(Float64(y + x) * Float64(y + x)))));
	else
		tmp = Float64(Float64(x / y) / Float64(y + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = x + (y + 1.0);
	tmp = 0.0;
	if (x <= -5.6e+171)
		tmp = (y / t_0) / (x + (y * 2.0));
	elseif (x <= -4e-13)
		tmp = y / ((y + x) * t_0);
	elseif (x <= -4e-148)
		tmp = x * (y / ((y + 1.0) * ((y + x) * (y + x))));
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+171], N[(N[(y / t$95$0), $MachinePrecision] / N[(x + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-13], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-148], N[(x * N[(y / N[(N[(y + 1.0), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\

\mathbf{elif}\;x \leq -4 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\

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

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


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

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.60000000000000009e171 < x < -4.0000000000000001e-13

    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. *-commutative67.4%

        \[\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)} \]
      2. associate-*l*67.3%

        \[\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)}} \]
      3. times-frac95.1%

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \color{blue}{\left(1 + \left(x + y\right)\right)}} \]
      5. distribute-lft-in95.0%

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e-13 < x < -3.99999999999999974e-148

    1. Initial program 87.3%

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

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

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

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

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

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

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

    if -3.99999999999999974e-148 < x

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;x \leq -9 \cdot 10^{+170}:\\ \;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y + x} \cdot \frac{\frac{y}{y + 1}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (+ x (+ y 1.0))))
   (if (<= x -9e+170)
     (/ (/ y t_0) (+ x (* y 2.0)))
     (if (<= x -4e-13)
       (/ y (* (+ y x) t_0))
       (* (/ x (+ y x)) (/ (/ y (+ y 1.0)) (+ y x)))))))
double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -9e+170) {
		tmp = (y / t_0) / (x + (y * 2.0));
	} else if (x <= -4e-13) {
		tmp = y / ((y + x) * t_0);
	} else {
		tmp = (x / (y + x)) * ((y / (y + 1.0)) / (y + x));
	}
	return tmp;
}
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 (x <= (-9d+170)) then
        tmp = (y / t_0) / (x + (y * 2.0d0))
    else if (x <= (-4d-13)) then
        tmp = y / ((y + x) * t_0)
    else
        tmp = (x / (y + x)) * ((y / (y + 1.0d0)) / (y + x))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -9e+170) {
		tmp = (y / t_0) / (x + (y * 2.0));
	} else if (x <= -4e-13) {
		tmp = y / ((y + x) * t_0);
	} else {
		tmp = (x / (y + x)) * ((y / (y + 1.0)) / (y + x));
	}
	return tmp;
}
def code(x, y):
	t_0 = x + (y + 1.0)
	tmp = 0
	if x <= -9e+170:
		tmp = (y / t_0) / (x + (y * 2.0))
	elif x <= -4e-13:
		tmp = y / ((y + x) * t_0)
	else:
		tmp = (x / (y + x)) * ((y / (y + 1.0)) / (y + x))
	return tmp
function code(x, y)
	t_0 = Float64(x + Float64(y + 1.0))
	tmp = 0.0
	if (x <= -9e+170)
		tmp = Float64(Float64(y / t_0) / Float64(x + Float64(y * 2.0)));
	elseif (x <= -4e-13)
		tmp = Float64(y / Float64(Float64(y + x) * t_0));
	else
		tmp = Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / Float64(y + 1.0)) / Float64(y + x)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = x + (y + 1.0);
	tmp = 0.0;
	if (x <= -9e+170)
		tmp = (y / t_0) / (x + (y * 2.0));
	elseif (x <= -4e-13)
		tmp = y / ((y + x) * t_0);
	else
		tmp = (x / (y + x)) * ((y / (y + 1.0)) / (y + x));
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9e+170], N[(N[(y / t$95$0), $MachinePrecision] / N[(x + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-13], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -9 \cdot 10^{+170}:\\
\;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\

\mathbf{elif}\;x \leq -4 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\

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


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

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.00000000000000044e170 < x < -4.0000000000000001e-13

    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. *-commutative67.4%

        \[\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)} \]
      2. associate-*l*67.3%

        \[\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)}} \]
      3. times-frac95.1%

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \color{blue}{\left(1 + \left(x + y\right)\right)}} \]
      5. distribute-lft-in95.0%

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e-13 < x

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult61.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{y + x} \cdot \frac{\frac{y}{\color{blue}{y + 1}}}{y + x} \]
    11. Simplified84.7%

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

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

Alternative 4: 66.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+171}:\\ \;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-67}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (+ x (+ y 1.0))))
   (if (<= x -2.8e+171)
     (/ (/ y t_0) (+ x (* y 2.0)))
     (if (<= x -2.7e-67) (/ y (* (+ y x) t_0)) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -2.8e+171) {
		tmp = (y / t_0) / (x + (y * 2.0));
	} else if (x <= -2.7e-67) {
		tmp = y / ((y + x) * t_0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
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 (x <= (-2.8d+171)) then
        tmp = (y / t_0) / (x + (y * 2.0d0))
    else if (x <= (-2.7d-67)) then
        tmp = y / ((y + x) * t_0)
    else
        tmp = (x / y) / (y + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -2.8e+171) {
		tmp = (y / t_0) / (x + (y * 2.0));
	} else if (x <= -2.7e-67) {
		tmp = y / ((y + x) * t_0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	t_0 = x + (y + 1.0)
	tmp = 0
	if x <= -2.8e+171:
		tmp = (y / t_0) / (x + (y * 2.0))
	elif x <= -2.7e-67:
		tmp = y / ((y + x) * t_0)
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	t_0 = Float64(x + Float64(y + 1.0))
	tmp = 0.0
	if (x <= -2.8e+171)
		tmp = Float64(Float64(y / t_0) / Float64(x + Float64(y * 2.0)));
	elseif (x <= -2.7e-67)
		tmp = Float64(y / Float64(Float64(y + x) * t_0));
	else
		tmp = Float64(Float64(x / y) / Float64(y + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = x + (y + 1.0);
	tmp = 0.0;
	if (x <= -2.8e+171)
		tmp = (y / t_0) / (x + (y * 2.0));
	elseif (x <= -2.7e-67)
		tmp = y / ((y + x) * t_0);
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+171], N[(N[(y / t$95$0), $MachinePrecision] / N[(x + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.7e-67], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\

\mathbf{elif}\;x \leq -2.7 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\

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


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

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000004e171 < x < -2.70000000000000016e-67

    1. Initial program 69.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. *-commutative69.3%

        \[\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)} \]
      2. associate-*l*69.3%

        \[\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)}} \]
      3. times-frac96.1%

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \color{blue}{\left(1 + \left(x + y\right)\right)}} \]
      5. distribute-lft-in96.0%

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000016e-67 < x

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y + 1}} \]
    13. Simplified61.9%

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

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

Alternative 5: 66.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;x \leq -1.65 \cdot 10^{+171}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{t\_0}\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-67}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (+ x (+ y 1.0))))
   (if (<= x -1.65e+171)
     (/ (/ y (+ y x)) t_0)
     (if (<= x -1.45e-67) (/ y (* (+ y x) t_0)) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -1.65e+171) {
		tmp = (y / (y + x)) / t_0;
	} else if (x <= -1.45e-67) {
		tmp = y / ((y + x) * t_0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
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 (x <= (-1.65d+171)) then
        tmp = (y / (y + x)) / t_0
    else if (x <= (-1.45d-67)) then
        tmp = y / ((y + x) * t_0)
    else
        tmp = (x / y) / (y + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = x + (y + 1.0);
	double tmp;
	if (x <= -1.65e+171) {
		tmp = (y / (y + x)) / t_0;
	} else if (x <= -1.45e-67) {
		tmp = y / ((y + x) * t_0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	t_0 = x + (y + 1.0)
	tmp = 0
	if x <= -1.65e+171:
		tmp = (y / (y + x)) / t_0
	elif x <= -1.45e-67:
		tmp = y / ((y + x) * t_0)
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	t_0 = Float64(x + Float64(y + 1.0))
	tmp = 0.0
	if (x <= -1.65e+171)
		tmp = Float64(Float64(y / Float64(y + x)) / t_0);
	elseif (x <= -1.45e-67)
		tmp = Float64(y / Float64(Float64(y + x) * t_0));
	else
		tmp = Float64(Float64(x / y) / Float64(y + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = x + (y + 1.0);
	tmp = 0.0;
	if (x <= -1.65e+171)
		tmp = (y / (y + x)) / t_0;
	elseif (x <= -1.45e-67)
		tmp = y / ((y + x) * t_0);
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+171], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[x, -1.45e-67], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{t\_0}\\

\mathbf{elif}\;x \leq -1.45 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\

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


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

    1. Initial program 63.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 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.64999999999999996e171 < x < -1.45000000000000002e-67

    1. Initial program 69.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. *-commutative69.3%

        \[\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)} \]
      2. associate-*l*69.3%

        \[\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)}} \]
      3. times-frac96.1%

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \color{blue}{\left(1 + \left(x + y\right)\right)}} \]
      5. distribute-lft-in96.0%

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000002e-67 < x

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y + 1}} \]
    13. Simplified61.9%

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

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

Alternative 6: 66.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+171}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\ \mathbf{elif}\;x \leq -7.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(x + \left(y + 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.35e+171)
   (/ (/ y (+ y x)) (+ x 1.0))
   (if (<= x -7.8e-67)
     (/ y (* (+ y x) (+ x (+ y 1.0))))
     (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.35e+171) {
		tmp = (y / (y + x)) / (x + 1.0);
	} else if (x <= -7.8e-67) {
		tmp = y / ((y + x) * (x + (y + 1.0)));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.35d+171)) then
        tmp = (y / (y + x)) / (x + 1.0d0)
    else if (x <= (-7.8d-67)) then
        tmp = y / ((y + x) * (x + (y + 1.0d0)))
    else
        tmp = (x / y) / (y + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.35e+171) {
		tmp = (y / (y + x)) / (x + 1.0);
	} else if (x <= -7.8e-67) {
		tmp = y / ((y + x) * (x + (y + 1.0)));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.35e+171:
		tmp = (y / (y + x)) / (x + 1.0)
	elif x <= -7.8e-67:
		tmp = y / ((y + x) * (x + (y + 1.0)))
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.35e+171)
		tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + 1.0));
	elseif (x <= -7.8e-67)
		tmp = Float64(y / Float64(Float64(y + x) * Float64(x + Float64(y + 1.0))));
	else
		tmp = Float64(Float64(x / y) / Float64(y + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.35e+171)
		tmp = (y / (y + x)) / (x + 1.0);
	elseif (x <= -7.8e-67)
		tmp = y / ((y + x) * (x + (y + 1.0)));
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.35e+171], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.8e-67], N[(y / N[(N[(y + x), $MachinePrecision] * N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\

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

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


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

    1. Initial program 63.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 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3499999999999999e171 < x < -7.7999999999999997e-67

    1. Initial program 69.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. *-commutative69.3%

        \[\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)} \]
      2. associate-*l*69.3%

        \[\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)}} \]
      3. times-frac96.1%

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \color{blue}{\left(1 + \left(x + y\right)\right)}} \]
      5. distribute-lft-in96.0%

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.7999999999999997e-67 < x

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y + 1}} \]
    13. Simplified61.9%

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

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

Alternative 7: 99.8% accurate, 1.0× speedup?

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

\\
\frac{x}{y + x} \cdot \frac{\frac{y}{x + \left(y + 1\right)}}{y + x}
\end{array}
Derivation
  1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    2. cube-mult55.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 45.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -2.25 \cdot 10^{-91}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{x}}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.0) (/ y (* x x)) (if (<= x -2.25e-91) (/ y x) (/ 1.0 (/ y x)))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = y / (x * x);
	} else if (x <= -2.25e-91) {
		tmp = y / x;
	} else {
		tmp = 1.0 / (y / x);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.0d0)) then
        tmp = y / (x * x)
    else if (x <= (-2.25d-91)) then
        tmp = y / x
    else
        tmp = 1.0d0 / (y / x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = y / (x * x);
	} else if (x <= -2.25e-91) {
		tmp = y / x;
	} else {
		tmp = 1.0 / (y / x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.0:
		tmp = y / (x * x)
	elif x <= -2.25e-91:
		tmp = y / x
	else:
		tmp = 1.0 / (y / x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(y / Float64(x * x));
	elseif (x <= -2.25e-91)
		tmp = Float64(y / x);
	else
		tmp = Float64(1.0 / Float64(y / x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.0)
		tmp = y / (x * x);
	elseif (x <= -2.25e-91)
		tmp = y / x;
	else
		tmp = 1.0 / (y / x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.25e-91], N[(y / x), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\

\mathbf{elif}\;x \leq -2.25 \cdot 10^{-91}:\\
\;\;\;\;\frac{y}{x}\\

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


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

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

    if -1 < x < -2.24999999999999988e-91

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult67.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{y + x} \cdot \frac{\color{blue}{\frac{y}{1 + y}}}{y + x} \]
    10. Step-by-step derivation
      1. +-commutative92.6%

        \[\leadsto \frac{x}{y + x} \cdot \frac{\frac{y}{\color{blue}{y + 1}}}{y + x} \]
    11. Simplified92.6%

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

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

    if -2.24999999999999988e-91 < x

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}}} \]
    12. Simplified36.1%

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

Alternative 9: 62.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.8e-67) (/ (/ y (+ y x)) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.8e-67) {
		tmp = (y / (y + x)) / (x + 1.0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-8.8d-67)) then
        tmp = (y / (y + x)) / (x + 1.0d0)
    else
        tmp = (x / y) / (y + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -8.8e-67) {
		tmp = (y / (y + x)) / (x + 1.0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -8.8e-67:
		tmp = (y / (y + x)) / (x + 1.0)
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -8.8e-67)
		tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x / y) / Float64(y + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -8.8e-67)
		tmp = (y / (y + x)) / (x + 1.0);
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -8.8e-67], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\

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


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

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.8000000000000004e-67 < x

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y + 1}} \]
    13. Simplified61.9%

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

Alternative 10: 62.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.8e-67) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.8e-67) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-8.8d-67)) then
        tmp = (y / x) / (x + 1.0d0)
    else
        tmp = (x / y) / (y + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -8.8e-67) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -8.8e-67:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -8.8e-67)
		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x / y) / Float64(y + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -8.8e-67)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -8.8e-67], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\

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


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

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    13. Simplified69.2%

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

    if -8.8000000000000004e-67 < x

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y + 1}} \]
    13. Simplified61.9%

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

Alternative 11: 61.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{-67}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -6e-67) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
	double tmp;
	if (x <= -6e-67) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-6d-67)) then
        tmp = y / (x * (x + 1.0d0))
    else
        tmp = (x / y) / (y + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -6e-67) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -6e-67:
		tmp = y / (x * (x + 1.0))
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -6e-67)
		tmp = Float64(y / Float64(x * Float64(x + 1.0)));
	else
		tmp = Float64(Float64(x / y) / Float64(y + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -6e-67)
		tmp = y / (x * (x + 1.0));
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -6e-67], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\

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


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

    1. Initial program 67.2%

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

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

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

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

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

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

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

    if -6.00000000000000065e-67 < x

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{y + 1}} \]
    13. Simplified61.9%

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

Alternative 12: 60.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -8.8e-67) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
	double tmp;
	if (x <= -8.8e-67) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-8.8d-67)) then
        tmp = y / (x * (x + 1.0d0))
    else
        tmp = x / (y * (y + 1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -8.8e-67) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -8.8e-67:
		tmp = y / (x * (x + 1.0))
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -8.8e-67)
		tmp = Float64(y / Float64(x * Float64(x + 1.0)));
	else
		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -8.8e-67)
		tmp = y / (x * (x + 1.0));
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -8.8e-67], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\

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


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

    1. Initial program 67.2%

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

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

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

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

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

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

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

    if -8.8000000000000004e-67 < x

    1. Initial program 72.8%

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

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

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

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

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

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

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

Alternative 13: 61.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -23000:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -23000.0) (/ y (* x x)) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
	double tmp;
	if (x <= -23000.0) {
		tmp = y / (x * x);
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-23000.0d0)) then
        tmp = y / (x * x)
    else
        tmp = x / (y * (y + 1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -23000.0) {
		tmp = y / (x * x);
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -23000.0:
		tmp = y / (x * x)
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -23000.0)
		tmp = Float64(y / Float64(x * x));
	else
		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -23000.0)
		tmp = y / (x * x);
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -23000.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -23000:\\
\;\;\;\;\frac{y}{x \cdot x}\\

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


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

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

    if -23000 < x

    1. Initial program 73.4%

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

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

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

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

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

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

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

Alternative 14: 34.9% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.15 \cdot 10^{-94}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{x}}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -2.15e-94) (/ y x) (/ 1.0 (/ y x))))
double code(double x, double y) {
	double tmp;
	if (x <= -2.15e-94) {
		tmp = y / x;
	} else {
		tmp = 1.0 / (y / x);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-2.15d-94)) then
        tmp = y / x
    else
        tmp = 1.0d0 / (y / x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -2.15e-94) {
		tmp = y / x;
	} else {
		tmp = 1.0 / (y / x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -2.15e-94:
		tmp = y / x
	else:
		tmp = 1.0 / (y / x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -2.15e-94)
		tmp = Float64(y / x);
	else
		tmp = Float64(1.0 / Float64(y / x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -2.15e-94)
		tmp = y / x;
	else
		tmp = 1.0 / (y / x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -2.15e-94], N[(y / x), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.15 \cdot 10^{-94}:\\
\;\;\;\;\frac{y}{x}\\

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


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

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult42.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{y + x} \cdot \frac{\frac{y}{\color{blue}{y + 1}}}{y + x} \]
    11. Simplified68.0%

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

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

    if -2.1499999999999999e-94 < x

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}}} \]
    12. Simplified36.1%

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

Alternative 15: 34.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.9 \cdot 10^{-95}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y) :precision binary64 (if (<= x -4.9e-95) (/ y x) (/ x y)))
double code(double x, double y) {
	double tmp;
	if (x <= -4.9e-95) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-4.9d-95)) then
        tmp = y / x
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -4.9e-95) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -4.9e-95:
		tmp = y / x
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -4.9e-95)
		tmp = Float64(y / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -4.9e-95)
		tmp = y / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -4.9e-95], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{-95}:\\
\;\;\;\;\frac{y}{x}\\

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


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

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      2. cube-mult42.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{y + x} \cdot \frac{\frac{y}{\color{blue}{y + 1}}}{y + x} \]
    11. Simplified68.0%

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

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

    if -4.9e-95 < x

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

Alternative 16: 27.2% accurate, 5.7× speedup?

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

\\
\frac{x}{y}
\end{array}
Derivation
  1. Initial program 71.2%

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

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

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

    \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 52.4%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
  6. Step-by-step derivation
    1. +-commutative52.4%

      \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
  7. Simplified52.4%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  8. Taylor expanded in y around 0 27.0%

    \[\leadsto \color{blue}{\frac{x}{y}} \]
  9. Add Preprocessing

Alternative 17: 4.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{1}{y} \end{array} \]
(FPCore (x y) :precision binary64 (/ 1.0 y))
double code(double x, double y) {
	return 1.0 / y;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 / y
end function
public static double code(double x, double y) {
	return 1.0 / y;
}
def code(x, y):
	return 1.0 / y
function code(x, y)
	return Float64(1.0 / y)
end
function tmp = code(x, y)
	tmp = 1.0 / y;
end
code[x_, y_] := N[(1.0 / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{y}
\end{array}
Derivation
  1. Initial program 71.2%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 46.7%

    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \color{blue}{x}\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  4. Taylor expanded in y around inf 4.2%

    \[\leadsto \color{blue}{\frac{1}{y}} \]
  5. Add Preprocessing

Alternative 18: 3.6% accurate, 8.5× speedup?

\[\begin{array}{l} \\ -x \end{array} \]
(FPCore (x y) :precision binary64 (- x))
double code(double x, double y) {
	return -x;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = -x
end function
public static double code(double x, double y) {
	return -x;
}
def code(x, y):
	return -x
function code(x, y)
	return Float64(-x)
end
function tmp = code(x, y)
	tmp = -x;
end
code[x_, y_] := (-x)
\begin{array}{l}

\\
-x
\end{array}
Derivation
  1. Initial program 71.2%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. associate-/l*83.9%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
    2. associate-+l+83.9%

      \[\leadsto x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(x + \left(y + 1\right)\right)}} \]
  3. Simplified83.9%

    \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 52.4%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
  6. Step-by-step derivation
    1. +-commutative52.4%

      \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
  7. Simplified52.4%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  8. Taylor expanded in y around 0 14.2%

    \[\leadsto \color{blue}{\frac{x + -1 \cdot \left(x \cdot y\right)}{y}} \]
  9. Step-by-step derivation
    1. mul-1-neg14.2%

      \[\leadsto \frac{x + \color{blue}{\left(-x \cdot y\right)}}{y} \]
    2. *-commutative14.2%

      \[\leadsto \frac{x + \left(-\color{blue}{y \cdot x}\right)}{y} \]
    3. distribute-rgt-neg-in14.2%

      \[\leadsto \frac{x + \color{blue}{y \cdot \left(-x\right)}}{y} \]
  10. Simplified14.2%

    \[\leadsto \color{blue}{\frac{x + y \cdot \left(-x\right)}{y}} \]
  11. Taylor expanded in y around inf 3.5%

    \[\leadsto \color{blue}{-1 \cdot x} \]
  12. Step-by-step derivation
    1. mul-1-neg3.5%

      \[\leadsto \color{blue}{-x} \]
  13. Simplified3.5%

    \[\leadsto \color{blue}{-x} \]
  14. Add Preprocessing

Developer Target 1: 99.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y):
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y)
	return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x))))
end
function tmp = code(x, y)
	tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}

Reproduce

?
herbie shell --seed 2024157 
(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))))