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

Percentage Accurate: 69.2% → 99.8%
Time: 18.7s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 69.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{y \cdot x}{\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)}} \]
    4. distribute-rgt1-in66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x}{y + 1}\\
\mathbf{if}\;x \leq -650000:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x + \left(y + \left(y + 1\right)\right)}\\

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

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


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(\color{blue}{-1} + -1 \cdot y\right) - y\right)} \]
      12. neg-mul-177.2%

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

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

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

    if -6.5e5 < x < -2.2000000000000001e-157

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg99.6%

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

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

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

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

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

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

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

    if -2.2000000000000001e-157 < x

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.52 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x - y \cdot -2}\\

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

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


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

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(\color{blue}{-1} + -1 \cdot y\right) - y\right)} \]
      12. neg-mul-183.7%

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

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

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

      \[\leadsto \frac{\frac{y}{x + y}}{x - \color{blue}{-2 \cdot y}} \]
    11. Step-by-step derivation
      1. *-commutative83.7%

        \[\leadsto \frac{\frac{y}{x + y}}{x - \color{blue}{y \cdot -2}} \]
    12. Simplified83.7%

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

    if -2.5200000000000001e154 < x < -2.4e-155

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(\color{blue}{-1} + -1 \cdot y\right) - y\right)} \]
      12. neg-mul-154.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e-155 < x

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 63.7% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.070000000000000007 < x < -8.00000000000000011e-155

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg99.6%

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

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

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

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

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

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

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

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

    if -8.00000000000000011e-155 < x

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 63.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(\color{blue}{-1} + -1 \cdot y\right) - y\right)} \]
      12. neg-mul-177.2%

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

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

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

      \[\leadsto \frac{\frac{y}{x + y}}{x - \color{blue}{-2 \cdot y}} \]
    11. Step-by-step derivation
      1. *-commutative76.8%

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

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

    if -2600 < x < -2.35e-153

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg99.6%

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

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

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

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

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

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

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

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

    if -2.35e-153 < x

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 64.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -70:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x + \left(y + \left(y + 1\right)\right)}\\

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

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


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(\color{blue}{-1} + -1 \cdot y\right) - y\right)} \]
      12. neg-mul-177.2%

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

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

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

    if -70 < x < -3.50000000000000015e-155

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg99.6%

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

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

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

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

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

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

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

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

    if -3.50000000000000015e-155 < x

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 86.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{y}{x + y}\\
\mathbf{if}\;x \leq -0.245:\\
\;\;\;\;\frac{t_0}{x + \left(y + \left(y + 1\right)\right)}\\

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


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(\color{blue}{-1} + -1 \cdot y\right) - y\right)} \]
      12. neg-mul-177.2%

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

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

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

    if -0.245 < x

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{y + 1} \]
      2. *-rgt-identity91.3%

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

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

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

Alternative 8: 34.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.8 \cdot 10^{-203}:\\
\;\;\;\;\frac{y}{x} - y\\

\mathbf{elif}\;y \leq 19500000:\\
\;\;\;\;\frac{x}{y} - x\\

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


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

    1. Initial program 65.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-/r*67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Simplified22.1%

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

    if 6.7999999999999998e-203 < y < 1.95e7

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{y} - x} \]
    10. Simplified23.5%

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

    if 1.95e7 < y

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 34.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.15 \cdot 10^{-202}:\\
\;\;\;\;\frac{y}{x} - y\\

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

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


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

    1. Initial program 65.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-/r*67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Simplified22.1%

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

    if 1.1499999999999999e-202 < y < 2.75000000000000004e166

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.75000000000000004e166 < y

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 60.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

    if -5.4999999999999998e-110 < x < 7.20000000000000001e-45

    1. Initial program 64.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*64.1%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative64.1%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative64.1%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative64.1%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/79.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative79.9%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/79.9%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg79.9%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative79.9%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative79.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg79.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative79.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+79.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified79.9%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 74.9%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative74.9%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified74.9%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]

    if 7.20000000000000001e-45 < x

    1. Initial program 72.9%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*75.4%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative75.4%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative75.4%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative75.4%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/87.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative87.9%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/87.9%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg87.9%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative87.9%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative87.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg87.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative87.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+87.9%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.9%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 35.1%

      \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Taylor expanded in y around inf 34.5%

      \[\leadsto \frac{1}{y} \cdot \color{blue}{\frac{x}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-110}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \end{array} \]
(FPCore (x y)
 :precision binary64
 (* (/ (/ y (+ x y)) (+ x y)) (/ x (+ x (+ y 1.0)))))
double code(double x, double y) {
	return ((y / (x + y)) / (x + y)) * (x / (x + (y + 1.0)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((y / (x + y)) / (x + y)) * (x / (x + (y + 1.0d0)))
end function
public static double code(double x, double y) {
	return ((y / (x + y)) / (x + y)) * (x / (x + (y + 1.0)));
}
def code(x, y):
	return ((y / (x + y)) / (x + y)) * (x / (x + (y + 1.0)))
function code(x, y)
	return Float64(Float64(Float64(y / Float64(x + y)) / Float64(x + y)) * Float64(x / Float64(x + Float64(y + 1.0))))
end
function tmp = code(x, y)
	tmp = ((y / (x + y)) / (x + y)) * (x / (x + (y + 1.0)));
end
code[x_, y_] := N[(N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)}
\end{array}
Derivation
  1. Initial program 66.1%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. associate-/r*69.4%

      \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
    2. *-commutative69.4%

      \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
    3. +-commutative69.4%

      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
    4. +-commutative69.4%

      \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
    5. associate-*l/84.4%

      \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
    6. +-commutative84.4%

      \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
    7. associate-*r/84.4%

      \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
    8. remove-double-neg84.4%

      \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
    9. +-commutative84.4%

      \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
    10. +-commutative84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
    11. remove-double-neg84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
    12. +-commutative84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
    13. associate-+l+84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified84.4%

    \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-/r*84.3%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{y + 1} \]
    2. div-inv84.3%

      \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{y + 1} \]
  6. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{1}{x + y}\right)} \cdot \frac{x}{x + \left(y + 1\right)} \]
  7. Step-by-step derivation
    1. associate-*r/84.3%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot 1}{x + y}} \cdot \frac{x}{y + 1} \]
    2. *-rgt-identity84.3%

      \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot \frac{x}{y + 1} \]
  8. Simplified99.8%

    \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
  9. Final simplification99.8%

    \[\leadsto \frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{x + \left(y + 1\right)} \]
  10. Add Preprocessing

Alternative 12: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{x}{y + \left(x + 1\right)} \cdot \frac{y}{x + y}}{x + y} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (* (/ x (+ y (+ x 1.0))) (/ y (+ x y))) (+ x y)))
double code(double x, double y) {
	return ((x / (y + (x + 1.0))) * (y / (x + y))) / (x + y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x / (y + (x + 1.0d0))) * (y / (x + y))) / (x + y)
end function
public static double code(double x, double y) {
	return ((x / (y + (x + 1.0))) * (y / (x + y))) / (x + y);
}
def code(x, y):
	return ((x / (y + (x + 1.0))) * (y / (x + y))) / (x + y)
function code(x, y)
	return Float64(Float64(Float64(x / Float64(y + Float64(x + 1.0))) * Float64(y / Float64(x + y))) / Float64(x + y))
end
function tmp = code(x, y)
	tmp = ((x / (y + (x + 1.0))) * (y / (x + y))) / (x + y);
end
code[x_, y_] := N[(N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{x}{y + \left(x + 1\right)} \cdot \frac{y}{x + y}}{x + y}
\end{array}
Derivation
  1. Initial program 66.1%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac84.4%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. +-commutative84.4%

      \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
    3. +-commutative84.4%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
    4. +-commutative84.4%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
    5. times-frac66.1%

      \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    6. associate-*l/79.6%

      \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
    7. *-commutative79.6%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    8. *-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
    9. distribute-rgt1-in56.7%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
    10. fma-def79.6%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
    11. +-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
    12. +-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
    13. cube-unmult79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
    14. +-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
  3. Simplified79.6%

    \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-*r/66.1%

      \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    2. fma-udef48.7%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    3. cube-mult48.7%

      \[\leadsto \frac{y \cdot x}{\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)}} \]
    4. distribute-rgt1-in66.1%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    5. associate-+r+66.1%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
    6. *-commutative66.1%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
    7. frac-times84.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    8. associate-/r*99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    9. associate-*l/99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}} \]
    10. associate-+r+99.8%

      \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y} \]
    11. +-commutative99.8%

      \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y} \]
    12. associate-+l+99.8%

      \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y} \]
  6. Applied egg-rr99.8%

    \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}} \]
  7. Final simplification99.8%

    \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)} \cdot \frac{y}{x + y}}{x + y} \]
  8. Add Preprocessing

Alternative 13: 61.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.7e-109) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
	double tmp;
	if (x <= -1.7e-109) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.7d-109)) then
        tmp = (y / x) / (x + 1.0d0)
    else
        tmp = (x / (y + (x + 1.0d0))) / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.7e-109) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.7e-109:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = (x / (y + (x + 1.0))) / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.7e-109)
		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.7e-109)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = (x / (y + (x + 1.0))) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.7e-109], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.70000000000000006e-109

    1. Initial program 62.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*69.5%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative69.5%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative69.5%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative69.5%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/85.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative85.7%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/85.7%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg85.7%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative85.7%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified85.7%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 63.9%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*66.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative66.8%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    7. Simplified66.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]

    if -1.70000000000000006e-109 < x

    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-/r*69.3%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative69.3%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative69.3%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative69.3%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/83.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative83.6%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/83.6%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg83.6%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative83.6%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified83.6%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 56.6%

      \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Step-by-step derivation
      1. associate-*l/56.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{y}} \]
      2. *-un-lft-identity56.6%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{y} \]
      3. associate-+r+56.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{y} \]
      4. +-commutative56.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{y} \]
      5. associate-+r+56.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{y} \]
    7. Applied egg-rr56.6%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 61.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.7e-109) (/ (/ y (+ x y)) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
	double tmp;
	if (x <= -1.7e-109) {
		tmp = (y / (x + y)) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.7d-109)) then
        tmp = (y / (x + y)) / (x + 1.0d0)
    else
        tmp = (x / (y + (x + 1.0d0))) / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.7e-109) {
		tmp = (y / (x + y)) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.7e-109:
		tmp = (y / (x + y)) / (x + 1.0)
	else:
		tmp = (x / (y + (x + 1.0))) / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.7e-109)
		tmp = Float64(Float64(y / Float64(x + y)) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.7e-109)
		tmp = (y / (x + y)) / (x + 1.0);
	else
		tmp = (x / (y + (x + 1.0))) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.7e-109], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.70000000000000006e-109

    1. Initial program 62.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac85.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative85.6%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative85.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative85.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac62.8%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/78.9%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative78.9%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative78.9%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in43.8%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def78.9%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative78.9%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative78.9%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult78.9%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative78.9%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified78.9%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/62.7%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef35.9%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult35.9%

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in62.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+62.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative62.8%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times85.7%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. *-commutative85.7%

        \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. clear-num85.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
      10. associate-/r*99.8%

        \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
      11. frac-times99.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
      12. *-un-lft-identity99.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
      13. associate-+r+99.0%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
      14. +-commutative99.0%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
      15. associate-+l+99.0%

        \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
    6. Applied egg-rr99.0%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
    7. Taylor expanded in y around 0 67.1%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{1 + x}} \]
    8. Step-by-step derivation
      1. +-commutative67.1%

        \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]
    9. Simplified67.1%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + 1}} \]

    if -1.70000000000000006e-109 < x

    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-/r*69.3%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative69.3%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative69.3%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative69.3%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/83.6%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative83.6%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/83.6%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg83.6%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative83.6%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+83.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified83.6%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 56.6%

      \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    6. Step-by-step derivation
      1. associate-*l/56.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{y}} \]
      2. *-un-lft-identity56.6%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{y} \]
      3. associate-+r+56.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{y} \]
      4. +-commutative56.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{y} \]
      5. associate-+r+56.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{y} \]
    7. Applied egg-rr56.6%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 60.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\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 -1.7e-109) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.7e-109) {
		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 <= (-1.7d-109)) 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 <= -1.7e-109) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.7e-109:
		tmp = y / (x * (x + 1.0))
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.7e-109)
		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 <= -1.7e-109)
		tmp = y / (x * (x + 1.0));
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.7e-109], 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 -1.7 \cdot 10^{-109}:\\
\;\;\;\;\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 < -1.70000000000000006e-109

    1. Initial program 62.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*69.5%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative69.5%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative69.5%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative69.5%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/85.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative85.7%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/85.7%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg85.7%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative85.7%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified85.7%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 63.9%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]

    if -1.70000000000000006e-109 < x

    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. times-frac83.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative83.6%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative83.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative83.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac68.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/80.0%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative80.0%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in64.3%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def80.0%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/68.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef56.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult56.3%

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in68.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+68.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative68.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times83.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}} \]
      10. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y} \]
      11. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y} \]
      12. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}} \]
    7. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \frac{\color{blue}{\frac{x}{y + \left(x + 1\right)} \cdot \frac{y}{x + y}}}{x + y} \]
      2. clear-num99.8%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)} \cdot \color{blue}{\frac{1}{\frac{x + y}{y}}}}{x + y} \]
      3. un-div-inv99.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{x + y}{y}}}}{x + y} \]
      4. +-commutative99.9%

        \[\leadsto \frac{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{y + x}}{y}}}{x + y} \]
    8. Applied egg-rr99.9%

      \[\leadsto \frac{\color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{y + x}{y}}}}{x + y} \]
    9. Taylor expanded in x around 0 54.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*56.5%

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{1 + y}} \]
    11. Simplified56.5%

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{1 + y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 60.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\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 -1.7e-109) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.7e-109) {
		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 <= (-1.7d-109)) 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 <= -1.7e-109) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.7e-109:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = (x / y) / (y + 1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.7e-109)
		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 <= -1.7e-109)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = (x / y) / (y + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.7e-109], 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 -1.7 \cdot 10^{-109}:\\
\;\;\;\;\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 < -1.70000000000000006e-109

    1. Initial program 62.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*69.5%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative69.5%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative69.5%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative69.5%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/85.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative85.7%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/85.7%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg85.7%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative85.7%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+85.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified85.7%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 63.9%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*66.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative66.8%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    7. Simplified66.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]

    if -1.70000000000000006e-109 < x

    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. times-frac83.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative83.6%

        \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
      3. +-commutative83.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
      4. +-commutative83.6%

        \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      5. times-frac68.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/80.0%

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative80.0%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in64.3%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def80.0%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative80.0%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/68.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef56.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult56.3%

        \[\leadsto \frac{y \cdot x}{\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)}} \]
      4. distribute-rgt1-in68.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+68.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative68.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times83.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
      9. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}} \]
      10. associate-+r+99.9%

        \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y} \]
      11. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y} \]
      12. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{x + y} \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + y} \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}} \]
    7. Step-by-step derivation
      1. *-commutative99.9%

        \[\leadsto \frac{\color{blue}{\frac{x}{y + \left(x + 1\right)} \cdot \frac{y}{x + y}}}{x + y} \]
      2. clear-num99.8%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)} \cdot \color{blue}{\frac{1}{\frac{x + y}{y}}}}{x + y} \]
      3. un-div-inv99.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{x + y}{y}}}}{x + y} \]
      4. +-commutative99.9%

        \[\leadsto \frac{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{y + x}}{y}}}{x + y} \]
    8. Applied egg-rr99.9%

      \[\leadsto \frac{\color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{y + x}{y}}}}{x + y} \]
    9. Taylor expanded in x around 0 54.4%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*56.5%

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{1 + y}} \]
    11. Simplified56.5%

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{1 + y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 23.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6.8 \cdot 10^{-203}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y) :precision binary64 (if (<= y 6.8e-203) (- (/ y x) y) (/ x y)))
double code(double x, double y) {
	double tmp;
	if (y <= 6.8e-203) {
		tmp = (y / x) - y;
	} 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 (y <= 6.8d-203) then
        tmp = (y / x) - y
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= 6.8e-203) {
		tmp = (y / x) - y;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 6.8e-203:
		tmp = (y / x) - y
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 6.8e-203)
		tmp = Float64(Float64(y / x) - y);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 6.8e-203)
		tmp = (y / x) - y;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 6.8e-203], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.8 \cdot 10^{-203}:\\
\;\;\;\;\frac{y}{x} - y\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 6.7999999999999998e-203

    1. Initial program 65.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-/r*67.1%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative67.1%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative67.1%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative67.1%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/84.2%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative84.2%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/84.2%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg84.2%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative84.2%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative84.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg84.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative84.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+84.2%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified84.2%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 55.9%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*55.4%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative55.4%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    7. Simplified55.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]
    8. Taylor expanded in x around 0 22.1%

      \[\leadsto \color{blue}{-1 \cdot y + \frac{y}{x}} \]
    9. Step-by-step derivation
      1. neg-mul-122.1%

        \[\leadsto \color{blue}{\left(-y\right)} + \frac{y}{x} \]
      2. +-commutative22.1%

        \[\leadsto \color{blue}{\frac{y}{x} + \left(-y\right)} \]
      3. unsub-neg22.1%

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    10. Simplified22.1%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]

    if 6.7999999999999998e-203 < y

    1. Initial program 67.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*72.6%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
      2. *-commutative72.6%

        \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      3. +-commutative72.6%

        \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
      4. +-commutative72.6%

        \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
      5. associate-*l/84.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
      6. +-commutative84.7%

        \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
      7. associate-*r/84.6%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. remove-double-neg84.6%

        \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
      9. +-commutative84.6%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      10. +-commutative84.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
      11. remove-double-neg84.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
      12. +-commutative84.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      13. associate-+l+84.6%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified84.6%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 51.5%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    6. Step-by-step derivation
      1. +-commutative51.5%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    7. Simplified51.5%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    8. Taylor expanded in y around 0 27.3%

      \[\leadsto \frac{x}{\color{blue}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification24.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.8 \cdot 10^{-203}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 4.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{0.5}{y} \end{array} \]
(FPCore (x y) :precision binary64 (/ 0.5 y))
double code(double x, double y) {
	return 0.5 / y;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 0.5d0 / y
end function
public static double code(double x, double y) {
	return 0.5 / y;
}
def code(x, y):
	return 0.5 / y
function code(x, y)
	return Float64(0.5 / y)
end
function tmp = code(x, y)
	tmp = 0.5 / y;
end
code[x_, y_] := N[(0.5 / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{0.5}{y}
\end{array}
Derivation
  1. Initial program 66.1%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac84.4%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. +-commutative84.4%

      \[\leadsto \frac{x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1} \]
    3. +-commutative84.4%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}} \cdot \frac{y}{\left(x + y\right) + 1} \]
    4. +-commutative84.4%

      \[\leadsto \frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
    5. times-frac66.1%

      \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    6. associate-*l/79.6%

      \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
    7. *-commutative79.6%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    8. *-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
    9. distribute-rgt1-in56.7%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
    10. fma-def79.6%

      \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
    11. +-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
    12. +-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
    13. cube-unmult79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
    14. +-commutative79.6%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
  3. Simplified79.6%

    \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-*r/66.1%

      \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    2. fma-udef48.7%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    3. cube-mult48.7%

      \[\leadsto \frac{y \cdot x}{\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)}} \]
    4. distribute-rgt1-in66.1%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    5. associate-+r+66.1%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
    6. *-commutative66.1%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
    7. frac-times84.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    8. *-commutative84.4%

      \[\leadsto \color{blue}{\frac{x}{x + \left(y + 1\right)} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)}} \]
    9. clear-num84.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{x}}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \]
    10. associate-/r*99.8%

      \[\leadsto \frac{1}{\frac{x + \left(y + 1\right)}{x}} \cdot \color{blue}{\frac{\frac{y}{x + y}}{x + y}} \]
    11. frac-times99.3%

      \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x + y}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)}} \]
    12. *-un-lft-identity99.3%

      \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{\frac{x + \left(y + 1\right)}{x} \cdot \left(x + y\right)} \]
    13. associate-+r+99.3%

      \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(x + y\right) + 1}}{x} \cdot \left(x + y\right)} \]
    14. +-commutative99.3%

      \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{\left(y + x\right)} + 1}{x} \cdot \left(x + y\right)} \]
    15. associate-+l+99.3%

      \[\leadsto \frac{\frac{y}{x + y}}{\frac{\color{blue}{y + \left(x + 1\right)}}{x} \cdot \left(x + y\right)} \]
  6. Applied egg-rr99.3%

    \[\leadsto \color{blue}{\frac{\frac{y}{x + y}}{\frac{y + \left(x + 1\right)}{x} \cdot \left(x + y\right)}} \]
  7. Taylor expanded in x around -inf 54.8%

    \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x + -1 \cdot \left(-1 \cdot y + -1 \cdot \left(1 + y\right)\right)}} \]
  8. Step-by-step derivation
    1. mul-1-neg54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x + \color{blue}{\left(-\left(-1 \cdot y + -1 \cdot \left(1 + y\right)\right)\right)}} \]
    2. unsub-neg54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x - \left(-1 \cdot y + -1 \cdot \left(1 + y\right)\right)}} \]
    3. neg-mul-154.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\color{blue}{\left(-y\right)} + -1 \cdot \left(1 + y\right)\right)} \]
    4. +-commutative54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \color{blue}{\left(-1 \cdot \left(1 + y\right) + \left(-y\right)\right)}} \]
    5. +-commutative54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(-1 \cdot \color{blue}{\left(y + 1\right)} + \left(-y\right)\right)} \]
    6. neg-mul-154.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\color{blue}{\left(-\left(y + 1\right)\right)} + \left(-y\right)\right)} \]
    7. unsub-neg54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \color{blue}{\left(\left(-\left(y + 1\right)\right) - y\right)}} \]
    8. neg-mul-154.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\color{blue}{-1 \cdot \left(y + 1\right)} - y\right)} \]
    9. +-commutative54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(-1 \cdot \color{blue}{\left(1 + y\right)} - y\right)} \]
    10. distribute-lft-in54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\color{blue}{\left(-1 \cdot 1 + -1 \cdot y\right)} - y\right)} \]
    11. metadata-eval54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(\color{blue}{-1} + -1 \cdot y\right) - y\right)} \]
    12. neg-mul-154.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\left(-1 + \color{blue}{\left(-y\right)}\right) - y\right)} \]
    13. unsub-neg54.8%

      \[\leadsto \frac{\frac{y}{x + y}}{x - \left(\color{blue}{\left(-1 - y\right)} - y\right)} \]
  9. Simplified54.8%

    \[\leadsto \frac{\frac{y}{x + y}}{\color{blue}{x - \left(\left(-1 - y\right) - y\right)}} \]
  10. Taylor expanded in y around inf 4.3%

    \[\leadsto \color{blue}{\frac{0.5}{y}} \]
  11. Final simplification4.3%

    \[\leadsto \frac{0.5}{y} \]
  12. Add Preprocessing

Alternative 19: 26.1% 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 66.1%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. associate-/r*69.4%

      \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]
    2. *-commutative69.4%

      \[\leadsto \frac{\frac{\color{blue}{y \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
    3. +-commutative69.4%

      \[\leadsto \frac{\frac{y \cdot x}{\color{blue}{\left(y + x\right)} \cdot \left(x + y\right)}}{\left(x + y\right) + 1} \]
    4. +-commutative69.4%

      \[\leadsto \frac{\frac{y \cdot x}{\left(y + x\right) \cdot \color{blue}{\left(y + x\right)}}}{\left(x + y\right) + 1} \]
    5. associate-*l/84.4%

      \[\leadsto \frac{\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}}{\left(x + y\right) + 1} \]
    6. +-commutative84.4%

      \[\leadsto \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot x}{\color{blue}{\left(y + x\right)} + 1} \]
    7. associate-*r/84.4%

      \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
    8. remove-double-neg84.4%

      \[\leadsto \frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{\color{blue}{-\left(-x\right)}}{\left(y + x\right) + 1} \]
    9. +-commutative84.4%

      \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
    10. +-commutative84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{-\left(-x\right)}{\left(y + x\right) + 1} \]
    11. remove-double-neg84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{\color{blue}{x}}{\left(y + x\right) + 1} \]
    12. +-commutative84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
    13. associate-+l+84.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified84.4%

    \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 46.2%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
  6. Step-by-step derivation
    1. +-commutative46.2%

      \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
  7. Simplified46.2%

    \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  8. Taylor expanded in y around 0 24.2%

    \[\leadsto \frac{x}{\color{blue}{y}} \]
  9. Final simplification24.2%

    \[\leadsto \frac{x}{y} \]
  10. Add Preprocessing

Developer target: 99.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y):
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y)
	return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x))))
end
function tmp = code(x, y)
	tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}

Reproduce

?
herbie shell --seed 2024024 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))

  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))