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

Percentage Accurate: 69.1% → 99.8%
Time: 16.2s
Alternatives: 21
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 21 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.1% 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{y}{y + x} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{y + x} \end{array} \]
(FPCore (x y)
 :precision binary64
 (* (/ y (+ y x)) (/ (/ x (+ y (+ x 1.0))) (+ y x))))
double code(double x, double y) {
	return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (y / (y + x)) * ((x / (y + (x + 1.0d0))) / (y + x))
end function
public static double code(double x, double y) {
	return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x));
}
def code(x, y):
	return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x))
function code(x, y)
	return Float64(Float64(y / Float64(y + x)) * Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + x)))
end
function tmp = code(x, y)
	tmp = (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x));
end
code[x_, y_] := N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{y}{y + x} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{y + x}
\end{array}
Derivation
  1. Initial program 71.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+71.7%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.6% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < 1.55000000000000003e-212

    1. Initial program 69.5%

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

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

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

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

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

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

        \[\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. *-commutative81.7%

        \[\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. *-commutative81.7%

        \[\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-in52.0%

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

        \[\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. +-commutative81.7%

        \[\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. +-commutative81.7%

        \[\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-unmult81.7%

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

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

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

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

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

        \[\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-in69.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+69.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. *-commutative69.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-times88.9%

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

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

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

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

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

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

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

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

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

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

    if 1.55000000000000003e-212 < y < 1.20000000000000003e-4

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot x \]
    11. Simplified77.5%

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

    if 1.20000000000000003e-4 < y < 2.95e21

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/92.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. *-commutative92.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. *-commutative92.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-in92.2%

        \[\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-def92.2%

        \[\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. +-commutative92.2%

        \[\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. +-commutative92.2%

        \[\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-unmult92.7%

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult99.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-in99.6%

        \[\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+99.6%

        \[\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. *-commutative99.6%

        \[\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-times99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.95e21 < y < 1.29999999999999994e154

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.29999999999999994e154 < y

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.55 \cdot 10^{-212}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;y \leq 0.00012:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+21}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+154}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{y} \cdot \frac{x}{x + \left(y + 1\right)}\\ \end{array} \]

Alternative 3: 68.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 0.14:\\
\;\;\;\;t_0 \cdot \frac{x}{x + 1}\\

\mathbf{elif}\;y \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\

\mathbf{elif}\;y \leq 9 \cdot 10^{+153}:\\
\;\;\;\;t_0 \cdot \frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < 3.99999999999999985e-164

    1. Initial program 69.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-*l*69.0%

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/80.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. *-commutative80.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. *-commutative80.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-in52.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-def80.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. +-commutative80.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. +-commutative80.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-unmult80.8%

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult47.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-in69.0%

        \[\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+69.0%

        \[\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. *-commutative69.0%

        \[\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-times87.7%

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999985e-164 < y < 0.14000000000000001

    1. Initial program 89.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-*l*89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.14000000000000001 < y < 2.95e21

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/92.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. *-commutative92.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. *-commutative92.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-in92.2%

        \[\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-def92.2%

        \[\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. +-commutative92.2%

        \[\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. +-commutative92.2%

        \[\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-unmult92.7%

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult99.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-in99.6%

        \[\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+99.6%

        \[\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. *-commutative99.6%

        \[\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-times99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.95e21 < y < 9.0000000000000002e153

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000002e153 < y

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4 \cdot 10^{-164}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;y \leq 0.14:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{x + 1}\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+21}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+153}:\\ \;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{y} \cdot \frac{x}{x + \left(y + 1\right)}\\ \end{array} \]

Alternative 4: 53.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{y} \cdot \frac{1}{y}\\ \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -5.3 \cdot 10^{-107}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{-148}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-171}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-184} \lor \neg \left(x \leq 2.7 \cdot 10^{-125}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (/ x y) (/ 1.0 y))))
   (if (<= x -1.0)
     (/ (/ y x) x)
     (if (<= x -5.3e-107)
       (/ y x)
       (if (<= x -8.8e-148)
         t_0
         (if (<= x -1.85e-171)
           (/ y x)
           (if (or (<= x -8e-184) (not (<= x 2.7e-125))) t_0 (/ x y))))))))
double code(double x, double y) {
	double t_0 = (x / y) * (1.0 / y);
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if (x <= -5.3e-107) {
		tmp = y / x;
	} else if (x <= -8.8e-148) {
		tmp = t_0;
	} else if (x <= -1.85e-171) {
		tmp = y / x;
	} else if ((x <= -8e-184) || !(x <= 2.7e-125)) {
		tmp = t_0;
	} else {
		tmp = 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 / y)
    if (x <= (-1.0d0)) then
        tmp = (y / x) / x
    else if (x <= (-5.3d-107)) then
        tmp = y / x
    else if (x <= (-8.8d-148)) then
        tmp = t_0
    else if (x <= (-1.85d-171)) then
        tmp = y / x
    else if ((x <= (-8d-184)) .or. (.not. (x <= 2.7d-125))) then
        tmp = t_0
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = (x / y) * (1.0 / y);
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if (x <= -5.3e-107) {
		tmp = y / x;
	} else if (x <= -8.8e-148) {
		tmp = t_0;
	} else if (x <= -1.85e-171) {
		tmp = y / x;
	} else if ((x <= -8e-184) || !(x <= 2.7e-125)) {
		tmp = t_0;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	t_0 = (x / y) * (1.0 / y)
	tmp = 0
	if x <= -1.0:
		tmp = (y / x) / x
	elif x <= -5.3e-107:
		tmp = y / x
	elif x <= -8.8e-148:
		tmp = t_0
	elif x <= -1.85e-171:
		tmp = y / x
	elif (x <= -8e-184) or not (x <= 2.7e-125):
		tmp = t_0
	else:
		tmp = x / y
	return tmp
function code(x, y)
	t_0 = Float64(Float64(x / y) * Float64(1.0 / y))
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(Float64(y / x) / x);
	elseif (x <= -5.3e-107)
		tmp = Float64(y / x);
	elseif (x <= -8.8e-148)
		tmp = t_0;
	elseif (x <= -1.85e-171)
		tmp = Float64(y / x);
	elseif ((x <= -8e-184) || !(x <= 2.7e-125))
		tmp = t_0;
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (x / y) * (1.0 / y);
	tmp = 0.0;
	if (x <= -1.0)
		tmp = (y / x) / x;
	elseif (x <= -5.3e-107)
		tmp = y / x;
	elseif (x <= -8.8e-148)
		tmp = t_0;
	elseif (x <= -1.85e-171)
		tmp = y / x;
	elseif ((x <= -8e-184) || ~((x <= 2.7e-125)))
		tmp = t_0;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -5.3e-107], N[(y / x), $MachinePrecision], If[LessEqual[x, -8.8e-148], t$95$0, If[LessEqual[x, -1.85e-171], N[(y / x), $MachinePrecision], If[Or[LessEqual[x, -8e-184], N[Not[LessEqual[x, 2.7e-125]], $MachinePrecision]], t$95$0, N[(x / y), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -5.3 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;x \leq -8.8 \cdot 10^{-148}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{-171}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-184} \lor \neg \left(x \leq 2.7 \cdot 10^{-125}\right):\\
\;\;\;\;t_0\\

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


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

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{x}} \cdot \frac{1}{x} \]
    6. Step-by-step derivation
      1. un-div-inv73.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x}} \]
    7. Applied egg-rr73.8%

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

    if -1 < x < -5.3e-107 or -8.80000000000000068e-148 < x < -1.85000000000000006e-171

    1. Initial program 88.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-*l*88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3e-107 < x < -8.80000000000000068e-148 or -1.85000000000000006e-171 < x < -8.0000000000000005e-184 or 2.6999999999999998e-125 < x

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000005e-184 < x < 2.6999999999999998e-125

    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. associate-*l*71.4%

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/79.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. *-commutative79.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. *-commutative79.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-in70.1%

        \[\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.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. +-commutative79.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. +-commutative79.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-unmult79.8%

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. 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-udef61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -5.3 \cdot 10^{-107}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{-148}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-171}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-184} \lor \neg \left(x \leq 2.7 \cdot 10^{-125}\right):\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 5: 64.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{if}\;y \leq 5.8 \cdot 10^{-211}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\ \;\;\;\;x \cdot t_0\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+44} \lor \neg \left(y \leq 3.8 \cdot 10^{+76}\right):\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (/ y (+ y x)) (+ y x))))
   (if (<= y 5.8e-211)
     (/ (/ y (+ x 1.0)) (+ y x))
     (if (<= y 6e-5)
       (* x t_0)
       (if (or (<= y 6e+44) (not (<= y 3.8e+76)))
         (/ (/ x (+ y (+ x 1.0))) (+ y x))
         t_0)))))
double code(double x, double y) {
	double t_0 = (y / (y + x)) / (y + x);
	double tmp;
	if (y <= 5.8e-211) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (y <= 6e-5) {
		tmp = x * t_0;
	} else if ((y <= 6e+44) || !(y <= 3.8e+76)) {
		tmp = (x / (y + (x + 1.0))) / (y + x);
	} else {
		tmp = t_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 / (y + x)) / (y + x)
    if (y <= 5.8d-211) then
        tmp = (y / (x + 1.0d0)) / (y + x)
    else if (y <= 6d-5) then
        tmp = x * t_0
    else if ((y <= 6d+44) .or. (.not. (y <= 3.8d+76))) then
        tmp = (x / (y + (x + 1.0d0))) / (y + x)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = (y / (y + x)) / (y + x);
	double tmp;
	if (y <= 5.8e-211) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else if (y <= 6e-5) {
		tmp = x * t_0;
	} else if ((y <= 6e+44) || !(y <= 3.8e+76)) {
		tmp = (x / (y + (x + 1.0))) / (y + x);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = (y / (y + x)) / (y + x)
	tmp = 0
	if y <= 5.8e-211:
		tmp = (y / (x + 1.0)) / (y + x)
	elif y <= 6e-5:
		tmp = x * t_0
	elif (y <= 6e+44) or not (y <= 3.8e+76):
		tmp = (x / (y + (x + 1.0))) / (y + x)
	else:
		tmp = t_0
	return tmp
function code(x, y)
	t_0 = Float64(Float64(y / Float64(y + x)) / Float64(y + x))
	tmp = 0.0
	if (y <= 5.8e-211)
		tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x));
	elseif (y <= 6e-5)
		tmp = Float64(x * t_0);
	elseif ((y <= 6e+44) || !(y <= 3.8e+76))
		tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + x));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (y / (y + x)) / (y + x);
	tmp = 0.0;
	if (y <= 5.8e-211)
		tmp = (y / (x + 1.0)) / (y + x);
	elseif (y <= 6e-5)
		tmp = x * t_0;
	elseif ((y <= 6e+44) || ~((y <= 3.8e+76)))
		tmp = (x / (y + (x + 1.0))) / (y + x);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.8e-211], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-5], N[(x * t$95$0), $MachinePrecision], If[Or[LessEqual[y, 6e+44], N[Not[LessEqual[y, 3.8e+76]], $MachinePrecision]], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{if}\;y \leq 5.8 \cdot 10^{-211}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\
\;\;\;\;x \cdot t_0\\

\mathbf{elif}\;y \leq 6 \cdot 10^{+44} \lor \neg \left(y \leq 3.8 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x}\\

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


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

    1. Initial program 69.5%

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

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

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

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

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

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

        \[\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. *-commutative81.7%

        \[\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. *-commutative81.7%

        \[\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-in52.0%

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

        \[\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. +-commutative81.7%

        \[\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. +-commutative81.7%

        \[\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-unmult81.7%

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

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

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

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

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

        \[\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-in69.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+69.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. *-commutative69.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-times88.9%

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

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

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

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

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

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

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

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

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

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

    if 5.80000000000000029e-211 < y < 6.00000000000000015e-5

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot x \]
    11. Simplified77.5%

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

    if 6.00000000000000015e-5 < y < 5.99999999999999974e44 or 3.80000000000000024e76 < y

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

    if 5.99999999999999974e44 < y < 3.80000000000000024e76

    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-*l*66.1%

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

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

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

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

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

        \[\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. *-commutative99.5%

        \[\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. *-commutative99.5%

        \[\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-in66.1%

        \[\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-def99.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. +-commutative99.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. +-commutative99.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-unmult99.5%

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

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

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

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

        \[\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-times99.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.8 \cdot 10^{-211}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+44} \lor \neg \left(y \leq 3.8 \cdot 10^{+76}\right):\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x}\\ \end{array} \]

Alternative 6: 91.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_0 := y + \left(x + 1\right)\\
\mathbf{if}\;y \leq 4 \cdot 10^{+101}:\\
\;\;\;\;y \cdot \frac{\frac{x}{\left(y + x\right) \cdot t_0}}{y + x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.9999999999999999e101

    1. Initial program 73.6%

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

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

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

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

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

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

        \[\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. *-commutative84.2%

        \[\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. *-commutative84.2%

        \[\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-in61.2%

        \[\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-def84.2%

        \[\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. +-commutative84.2%

        \[\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. +-commutative84.2%

        \[\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-unmult84.3%

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult55.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-in73.6%

        \[\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+73.6%

        \[\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. *-commutative73.6%

        \[\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-times90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9999999999999999e101 < y

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 64.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{if}\;y \leq 2.25 \cdot 10^{-212}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\mathbf{elif}\;y \leq 0.016:\\
\;\;\;\;x \cdot t_0\\

\mathbf{elif}\;y \leq 6 \cdot 10^{+44}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+76}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < 2.2499999999999999e-212

    1. Initial program 69.5%

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

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

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

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

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

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

        \[\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. *-commutative81.7%

        \[\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. *-commutative81.7%

        \[\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-in52.0%

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

        \[\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. +-commutative81.7%

        \[\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. +-commutative81.7%

        \[\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-unmult81.7%

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

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

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

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

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

        \[\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-in69.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+69.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. *-commutative69.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-times88.9%

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

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

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

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

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

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

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

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

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

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

    if 2.2499999999999999e-212 < y < 0.016

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x + y}}}{x + y} \cdot x \]
    11. Simplified77.5%

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

    if 0.016 < y < 5.99999999999999974e44

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/95.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. *-commutative95.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. *-commutative95.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-in95.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-def95.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. +-commutative95.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. +-commutative95.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-unmult95.8%

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult99.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-in99.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+99.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. *-commutative99.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-times99.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-*l/99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\frac{y \cdot x}{\color{blue}{y + 1}}}{x + y}}{x + y} \]
    8. Simplified93.0%

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

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

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

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

    if 5.99999999999999974e44 < y < 4.0000000000000002e76

    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-*l*66.1%

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

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

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

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

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

        \[\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. *-commutative99.5%

        \[\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. *-commutative99.5%

        \[\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-in66.1%

        \[\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-def99.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. +-commutative99.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. +-commutative99.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-unmult99.5%

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

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

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

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

        \[\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-times99.5%

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

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

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

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

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

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

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

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

    if 4.0000000000000002e76 < y

    1. Initial program 63.4%

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/82.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. *-commutative82.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. *-commutative82.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-in78.9%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def82.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. +-commutative82.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. +-commutative82.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-unmult82.8%

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

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

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

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

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

        \[\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-in63.4%

        \[\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+63.4%

        \[\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. *-commutative63.4%

        \[\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-times89.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\color{blue}{\frac{y \cdot x}{y + 1}}}{x + y}}{x + y} \]
    9. Taylor expanded in y around inf 84.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.25 \cdot 10^{-212}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;y \leq 0.016:\\ \;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+44}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+76}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + x}}{y + x}\\ \end{array} \]

Alternative 8: 64.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq -2.7 \cdot 10^{-208}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{x}{y + x}\\

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


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

    1. Initial program 62.4%

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

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

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

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

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

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

        \[\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.5%

        \[\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.5%

        \[\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-in37.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.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. +-commutative80.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. +-commutative80.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-unmult80.6%

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

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

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

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

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

        \[\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.4%

        \[\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.4%

        \[\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.8%

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

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

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

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

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

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

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

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

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

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

    if -0.00559999999999999994 < x < -1.9999999999999999e-147

    1. Initial program 95.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-*l*95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-147 < x < -2.7e-208

    1. Initial program 78.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-*l*78.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult73.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-in78.7%

        \[\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+78.7%

        \[\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. *-commutative78.7%

        \[\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.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{x}{x + y}} \]
    11. Applied egg-rr71.1%

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

    if -2.7e-208 < x

    1. Initial program 69.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-*l*69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 82.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000001e-11 < x

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 64.5% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 62.4%

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

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

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

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

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

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

        \[\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.5%

        \[\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.5%

        \[\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-in37.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.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. +-commutative80.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. +-commutative80.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-unmult80.6%

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

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

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

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

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

        \[\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.4%

        \[\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.4%

        \[\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.8%

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

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

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

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

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

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

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

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

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

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

    if -0.00640000000000000031 < x < -5.70000000000000022e-161

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.70000000000000022e-161 < x

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 60.8% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;x \leq -6.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{y}{x}\\

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


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

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{x}} \cdot \frac{1}{x} \]
    6. Step-by-step derivation
      1. un-div-inv73.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x}} \]
    7. Applied egg-rr73.8%

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

    if -1 < x < -6.7999999999999996e-61

    1. Initial program 93.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-*l*93.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+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. Taylor expanded in y around 0 80.7%

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

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

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

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

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

    if -6.7999999999999996e-61 < x

    1. Initial program 72.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-*l*72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.2% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 68.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+68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4999999999999994e-61 < x

    1. Initial program 72.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-*l*72.7%

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

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

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

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

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

        \[\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. *-commutative84.2%

        \[\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. *-commutative84.2%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in71.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-def84.2%

        \[\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. +-commutative84.2%

        \[\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. +-commutative84.2%

        \[\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-unmult84.2%

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

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

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

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

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult63.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-in72.7%

        \[\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+72.7%

        \[\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. *-commutative72.7%

        \[\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-times90.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-*l/84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \]

Alternative 13: 62.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{-61}:\\ \;\;\;\;\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 -5e-61) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
	double tmp;
	if (x <= -5e-61) {
		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 <= (-5d-61)) 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 <= -5e-61) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -5e-61:
		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 <= -5e-61)
		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 <= -5e-61)
		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, -5e-61], 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 -5 \cdot 10^{-61}:\\
\;\;\;\;\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 < -4.9999999999999999e-61

    1. Initial program 68.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+68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999999e-61 < x

    1. Initial program 72.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-*l*72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{y}} \]
      2. *-un-lft-identity66.3%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{y} \]
      3. associate-+r+66.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{y} \]
      4. +-commutative66.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{y} \]
      5. associate-+r+66.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{y} \]
    6. Applied egg-rr66.3%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \]

Alternative 14: 62.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -2.2e-61) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
	double tmp;
	if (x <= -2.2e-61) {
		tmp = (y / (x + 1.0)) / (y + x);
	} 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 <= (-2.2d-61)) then
        tmp = (y / (x + 1.0d0)) / (y + x)
    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 <= -2.2e-61) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -2.2e-61:
		tmp = (y / (x + 1.0)) / (y + x)
	else:
		tmp = (x / (y + (x + 1.0))) / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -2.2e-61)
		tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x));
	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 <= -2.2e-61)
		tmp = (y / (x + 1.0)) / (y + x);
	else
		tmp = (x / (y + (x + 1.0))) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -2.2e-61], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $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 -2.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\

\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 < -2.20000000000000009e-61

    1. Initial program 68.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-*l*68.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative68.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative68.9%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative68.9%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*68.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/83.2%

        \[\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. *-commutative83.2%

        \[\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. *-commutative83.2%

        \[\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-in44.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-def83.2%

        \[\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. +-commutative83.2%

        \[\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. +-commutative83.2%

        \[\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-unmult83.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative83.3%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified83.3%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/68.9%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef38.5%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult38.5%

        \[\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.9%

        \[\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.9%

        \[\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.9%

        \[\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-times88.8%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. associate-*l/88.8%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}}{x + y}} \]
      10. associate-+r+99.8%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y}}{x + y} \]
      11. +-commutative99.8%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y}}{x + y} \]
      12. associate-+l+99.8%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y}}{x + y} \]
    5. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}}{x + y}} \]
    6. Taylor expanded in y around 0 67.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{1 + x}}}{x + y} \]
    7. Step-by-step derivation
      1. +-commutative67.6%

        \[\leadsto \frac{\frac{y}{\color{blue}{x + 1}}}{x + y} \]
    8. Simplified67.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{x + 1}}}{x + y} \]

    if -2.20000000000000009e-61 < x

    1. Initial program 72.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-*l*72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. *-commutative72.7%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \]
      7. times-frac90.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. +-commutative90.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1} \]
      9. +-commutative90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(y + x\right) + 1} \]
      10. +-commutative90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around inf 66.2%

      \[\leadsto \color{blue}{\frac{1}{y}} \cdot \frac{x}{x + \left(y + 1\right)} \]
    5. Step-by-step derivation
      1. associate-*l/66.3%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{x + \left(y + 1\right)}}{y}} \]
      2. *-un-lft-identity66.3%

        \[\leadsto \frac{\color{blue}{\frac{x}{x + \left(y + 1\right)}}}{y} \]
      3. associate-+r+66.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{y} \]
      4. +-commutative66.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{y} \]
      5. associate-+r+66.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{y} \]
    6. Applied egg-rr66.3%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \end{array} \]

Alternative 15: 60.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -4.2e-61) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
	double tmp;
	if (x <= -4.2e-61) {
		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 <= (-4.2d-61)) 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 <= -4.2e-61) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -4.2e-61:
		tmp = y / (x * (x + 1.0))
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -4.2e-61)
		tmp = Float64(y / Float64(x * Float64(x + 1.0)));
	else
		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -4.2e-61)
		tmp = y / (x * (x + 1.0));
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -4.2e-61], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.1999999999999998e-61

    1. Initial program 68.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-*l*68.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative68.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative68.9%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative68.9%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*68.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. *-commutative68.9%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \]
      7. times-frac88.8%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. +-commutative88.8%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1} \]
      9. +-commutative88.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(y + x\right) + 1} \]
      10. +-commutative88.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+88.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified88.8%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 64.3%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    5. Step-by-step derivation
      1. +-commutative64.3%

        \[\leadsto \frac{y}{x \cdot \color{blue}{\left(x + 1\right)}} \]
    6. Simplified64.3%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(x + 1\right)}} \]

    if -4.1999999999999998e-61 < x

    1. Initial program 72.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-*l*72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. *-commutative72.7%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \]
      7. times-frac90.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. +-commutative90.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1} \]
      9. +-commutative90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(y + x\right) + 1} \]
      10. +-commutative90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 66.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative66.0%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified66.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]

Alternative 16: 61.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -6.8e-61) (/ (/ y x) (+ x 1.0)) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
	double tmp;
	if (x <= -6.8e-61) {
		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 <= (-6.8d-61)) 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 <= -6.8e-61) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -6.8e-61:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -6.8e-61)
		tmp = Float64(Float64(y / x) / Float64(x + 1.0));
	else
		tmp = Float64(x / Float64(y * Float64(y + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -6.8e-61)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -6.8e-61], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.7999999999999996e-61

    1. Initial program 68.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+68.9%

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(x + \left(y + 1\right)\right)}} \]
      2. *-commutative68.9%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)} \]
      3. frac-times88.8%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      4. associate-*l/88.8%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      5. times-frac99.8%

        \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{\frac{x}{x + \left(y + 1\right)}}{x + y}} \]
      6. associate-+r+99.8%

        \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y} \]
      7. +-commutative99.8%

        \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y} \]
      8. associate-+l+99.8%

        \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y} \]
    3. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{x + y}} \]
    4. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + y}{y}}} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{x + y} \]
      2. frac-times98.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y + \left(x + 1\right)}}{\frac{x + y}{y} \cdot \left(x + y\right)}} \]
      3. *-un-lft-identity98.7%

        \[\leadsto \frac{\color{blue}{\frac{x}{y + \left(x + 1\right)}}}{\frac{x + y}{y} \cdot \left(x + y\right)} \]
      4. +-commutative98.7%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{\color{blue}{y + x}}{y} \cdot \left(x + y\right)} \]
      5. +-commutative98.7%

        \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\frac{y + x}{y} \cdot \color{blue}{\left(y + x\right)}} \]
    5. Applied egg-rr98.7%

      \[\leadsto \color{blue}{\frac{\frac{x}{y + \left(x + 1\right)}}{\frac{y + x}{y} \cdot \left(y + x\right)}} \]
    6. Taylor expanded in y around 0 98.7%

      \[\leadsto \frac{\frac{x}{y + \left(x + 1\right)}}{\color{blue}{\left(1 + \frac{x}{y}\right)} \cdot \left(y + x\right)} \]
    7. Taylor expanded in y around 0 64.3%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    8. Step-by-step derivation
      1. associate-/r*67.2%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative67.2%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    9. Simplified67.2%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]

    if -6.7999999999999996e-61 < x

    1. Initial program 72.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-*l*72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative72.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*72.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. *-commutative72.7%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \]
      7. times-frac90.4%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. +-commutative90.4%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1} \]
      9. +-commutative90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(y + x\right) + 1} \]
      10. +-commutative90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+90.4%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 66.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative66.0%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified66.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]

Alternative 17: 45.8% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-107}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.0) (/ (/ y x) x) (if (<= x -2.1e-107) (/ y x) (/ x y))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if (x <= -2.1e-107) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.0d0)) then
        tmp = (y / x) / x
    else if (x <= (-2.1d-107)) then
        tmp = y / x
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if (x <= -2.1e-107) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.0:
		tmp = (y / x) / x
	elif x <= -2.1e-107:
		tmp = y / x
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(Float64(y / x) / x);
	elseif (x <= -2.1e-107)
		tmp = Float64(y / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.0)
		tmp = (y / x) / x;
	elseif (x <= -2.1e-107)
		tmp = y / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -2.1e-107], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\

\mathbf{elif}\;x \leq -2.1 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1

    1. Initial program 61.6%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-+r+61.6%

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(x + \left(y + 1\right)\right)}} \]
      2. *-commutative61.6%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)} \]
      3. frac-times85.6%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      4. associate-*l/85.6%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      5. times-frac99.8%

        \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{\frac{x}{x + \left(y + 1\right)}}{x + y}} \]
      6. associate-+r+99.8%

        \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y} \]
      7. +-commutative99.8%

        \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y} \]
      8. associate-+l+99.8%

        \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y} \]
    3. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{x + y}} \]
    4. Taylor expanded in x around inf 74.1%

      \[\leadsto \frac{y}{x + y} \cdot \color{blue}{\frac{1}{x}} \]
    5. Taylor expanded in y around 0 73.8%

      \[\leadsto \color{blue}{\frac{y}{x}} \cdot \frac{1}{x} \]
    6. Step-by-step derivation
      1. un-div-inv73.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x}} \]
    7. Applied egg-rr73.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x}} \]

    if -1 < x < -2.0999999999999999e-107

    1. Initial program 94.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*94.0%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative94.0%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative94.0%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative94.0%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*94.0%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. *-commutative94.0%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \]
      7. times-frac99.7%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. +-commutative99.7%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1} \]
      9. +-commutative99.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(y + x\right) + 1} \]
      10. +-commutative99.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+99.7%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 70.8%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{1 + x}} \]
    5. Step-by-step derivation
      1. +-commutative70.8%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + 1}} \]
    6. Simplified70.8%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{x + 1}} \]
    7. Taylor expanded in x around 0 67.4%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{x} \]
    8. Taylor expanded in y around 0 31.6%

      \[\leadsto \color{blue}{\frac{y}{x}} \]

    if -2.0999999999999999e-107 < x

    1. Initial program 71.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-*l*71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/83.7%

        \[\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. *-commutative83.7%

        \[\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. *-commutative83.7%

        \[\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-in70.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-def83.7%

        \[\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. +-commutative83.7%

        \[\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. +-commutative83.7%

        \[\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-unmult83.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative83.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified83.8%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/71.7%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef62.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult62.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-in71.7%

        \[\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.7%

        \[\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.7%

        \[\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-times90.0%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. associate-*l/83.3%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. associate-/r*86.2%

        \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}}{x + y}} \]
      10. associate-+r+86.2%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y}}{x + y} \]
      11. +-commutative86.2%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y}}{x + y} \]
      12. associate-+l+86.2%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y}}{x + y} \]
    5. Applied egg-rr86.2%

      \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}}{x + y}} \]
    6. Taylor expanded in x around 0 65.2%

      \[\leadsto \frac{\frac{\color{blue}{\frac{x \cdot y}{1 + y}}}{x + y}}{x + y} \]
    7. Step-by-step derivation
      1. *-commutative65.2%

        \[\leadsto \frac{\frac{\frac{\color{blue}{y \cdot x}}{1 + y}}{x + y}}{x + y} \]
      2. +-commutative65.2%

        \[\leadsto \frac{\frac{\frac{y \cdot x}{\color{blue}{y + 1}}}{x + y}}{x + y} \]
    8. Simplified65.2%

      \[\leadsto \frac{\frac{\color{blue}{\frac{y \cdot x}{y + 1}}}{x + y}}{x + y} \]
    9. Taylor expanded in y around 0 42.3%

      \[\leadsto \frac{\frac{\color{blue}{x \cdot y}}{x + y}}{x + y} \]
    10. Taylor expanded in x around 0 37.3%

      \[\leadsto \color{blue}{\frac{x}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-107}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 18: 33.7% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{-107}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y) :precision binary64 (if (<= x -1.22e-107) (/ y x) (/ x y)))
double code(double x, double y) {
	double tmp;
	if (x <= -1.22e-107) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.22d-107)) then
        tmp = y / x
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.22e-107) {
		tmp = y / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.22e-107:
		tmp = y / x
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.22e-107)
		tmp = Float64(y / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.22e-107)
		tmp = y / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.22e-107], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.22000000000000001e-107

    1. Initial program 71.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-*l*71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. *-commutative71.7%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \]
      7. times-frac90.0%

        \[\leadsto \color{blue}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1}} \]
      8. +-commutative90.0%

        \[\leadsto \frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(y + x\right)} \cdot \frac{x}{\left(y + x\right) + 1} \]
      9. +-commutative90.0%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \color{blue}{\left(x + y\right)}} \cdot \frac{x}{\left(y + x\right) + 1} \]
      10. +-commutative90.0%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{\left(x + y\right)} + 1} \]
      11. associate-+l+90.0%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 78.5%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{1 + x}} \]
    5. Step-by-step derivation
      1. +-commutative78.5%

        \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{\color{blue}{x + 1}} \]
    6. Simplified78.5%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{x}{x + 1}} \]
    7. Taylor expanded in x around 0 63.2%

      \[\leadsto \frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{x} \]
    8. Taylor expanded in y around 0 30.0%

      \[\leadsto \color{blue}{\frac{y}{x}} \]

    if -1.22000000000000001e-107 < x

    1. Initial program 71.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-*l*71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
      2. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      3. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
      4. +-commutative71.7%

        \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
      5. associate-*l*71.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      6. associate-*l/83.7%

        \[\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. *-commutative83.7%

        \[\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. *-commutative83.7%

        \[\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-in70.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-def83.7%

        \[\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. +-commutative83.7%

        \[\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. +-commutative83.7%

        \[\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-unmult83.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative83.8%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified83.8%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/71.7%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef62.3%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult62.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-in71.7%

        \[\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.7%

        \[\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.7%

        \[\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-times90.0%

        \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
      8. associate-*l/83.3%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. associate-/r*86.2%

        \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}}{x + y}} \]
      10. associate-+r+86.2%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y}}{x + y} \]
      11. +-commutative86.2%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y}}{x + y} \]
      12. associate-+l+86.2%

        \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y}}{x + y} \]
    5. Applied egg-rr86.2%

      \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}}{x + y}} \]
    6. Taylor expanded in x around 0 65.2%

      \[\leadsto \frac{\frac{\color{blue}{\frac{x \cdot y}{1 + y}}}{x + y}}{x + y} \]
    7. Step-by-step derivation
      1. *-commutative65.2%

        \[\leadsto \frac{\frac{\frac{\color{blue}{y \cdot x}}{1 + y}}{x + y}}{x + y} \]
      2. +-commutative65.2%

        \[\leadsto \frac{\frac{\frac{y \cdot x}{\color{blue}{y + 1}}}{x + y}}{x + y} \]
    8. Simplified65.2%

      \[\leadsto \frac{\frac{\color{blue}{\frac{y \cdot x}{y + 1}}}{x + y}}{x + y} \]
    9. Taylor expanded in y around 0 42.3%

      \[\leadsto \frac{\frac{\color{blue}{x \cdot y}}{x + y}}{x + y} \]
    10. Taylor expanded in x around 0 37.3%

      \[\leadsto \color{blue}{\frac{x}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{-107}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 19: 4.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{1}{x} \end{array} \]
(FPCore (x y) :precision binary64 (/ 1.0 x))
double code(double x, double y) {
	return 1.0 / x;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 / x
end function
public static double code(double x, double y) {
	return 1.0 / x;
}
def code(x, y):
	return 1.0 / x
function code(x, y)
	return Float64(1.0 / x)
end
function tmp = code(x, y)
	tmp = 1.0 / x;
end
code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{x}
\end{array}
Derivation
  1. Initial program 71.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+71.7%

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(x + \left(y + 1\right)\right)}} \]
    2. *-commutative71.7%

      \[\leadsto \frac{\color{blue}{y \cdot x}}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)} \]
    3. frac-times90.0%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    4. associate-*l/85.2%

      \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
    5. times-frac99.9%

      \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{\frac{x}{x + \left(y + 1\right)}}{x + y}} \]
    6. associate-+r+99.9%

      \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y} \]
    7. +-commutative99.9%

      \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y} \]
    8. associate-+l+99.9%

      \[\leadsto \frac{y}{x + y} \cdot \frac{\frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y} \]
  3. Applied egg-rr99.9%

    \[\leadsto \color{blue}{\frac{y}{x + y} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{x + y}} \]
  4. Taylor expanded in x around inf 32.2%

    \[\leadsto \frac{y}{x + y} \cdot \color{blue}{\frac{1}{x}} \]
  5. Taylor expanded in y around inf 3.8%

    \[\leadsto \color{blue}{\frac{1}{x}} \]
  6. Final simplification3.8%

    \[\leadsto \frac{1}{x} \]

Alternative 20: 26.0% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{x}{y} \end{array} \]
(FPCore (x y) :precision binary64 (/ x y))
double code(double x, double y) {
	return x / y;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = x / y
end function
public static double code(double x, double y) {
	return x / y;
}
def code(x, y):
	return x / y
function code(x, y)
	return Float64(x / y)
end
function tmp = code(x, y)
	tmp = x / y;
end
code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{y}
\end{array}
Derivation
  1. Initial program 71.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-*l*71.7%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
    2. +-commutative71.7%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
    3. +-commutative71.7%

      \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
    4. +-commutative71.7%

      \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
    5. associate-*l*71.7%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    6. associate-*l/84.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. *-commutative84.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. *-commutative84.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.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-def83.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. +-commutative83.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. +-commutative83.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-unmult84.0%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
    14. +-commutative84.0%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
  3. Simplified84.0%

    \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
  4. Step-by-step derivation
    1. associate-*r/71.7%

      \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    2. fma-udef57.2%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    3. cube-mult57.1%

      \[\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.7%

      \[\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.7%

      \[\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.7%

      \[\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-times90.0%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    8. associate-*l/85.2%

      \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
    9. associate-/r*90.1%

      \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}}{x + y}} \]
    10. associate-+r+90.1%

      \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y}}{x + y} \]
    11. +-commutative90.1%

      \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y}}{x + y} \]
    12. associate-+l+90.1%

      \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y}}{x + y} \]
  5. Applied egg-rr90.1%

    \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}}{x + y}} \]
  6. Taylor expanded in x around 0 63.4%

    \[\leadsto \frac{\frac{\color{blue}{\frac{x \cdot y}{1 + y}}}{x + y}}{x + y} \]
  7. Step-by-step derivation
    1. *-commutative63.4%

      \[\leadsto \frac{\frac{\frac{\color{blue}{y \cdot x}}{1 + y}}{x + y}}{x + y} \]
    2. +-commutative63.4%

      \[\leadsto \frac{\frac{\frac{y \cdot x}{\color{blue}{y + 1}}}{x + y}}{x + y} \]
  8. Simplified63.4%

    \[\leadsto \frac{\frac{\color{blue}{\frac{y \cdot x}{y + 1}}}{x + y}}{x + y} \]
  9. Taylor expanded in y around 0 40.1%

    \[\leadsto \frac{\frac{\color{blue}{x \cdot y}}{x + y}}{x + y} \]
  10. Taylor expanded in x around 0 28.4%

    \[\leadsto \color{blue}{\frac{x}{y}} \]
  11. Final simplification28.4%

    \[\leadsto \frac{x}{y} \]

Alternative 21: 3.5% accurate, 17.0× speedup?

\[\begin{array}{l} \\ 1 \end{array} \]
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
	return 1.0;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0
end function
public static double code(double x, double y) {
	return 1.0;
}
def code(x, y):
	return 1.0
function code(x, y)
	return 1.0
end
function tmp = code(x, y)
	tmp = 1.0;
end
code[x_, y_] := 1.0
\begin{array}{l}

\\
1
\end{array}
Derivation
  1. Initial program 71.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-*l*71.7%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)}} \]
    2. +-commutative71.7%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)\right)} \]
    3. +-commutative71.7%

      \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} \cdot \left(\left(x + y\right) + 1\right)\right)} \]
    4. +-commutative71.7%

      \[\leadsto \frac{x \cdot y}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)\right)} \]
    5. associate-*l*71.7%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
    6. associate-*l/84.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. *-commutative84.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. *-commutative84.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.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-def83.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. +-commutative83.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. +-commutative83.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-unmult84.0%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
    14. +-commutative84.0%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
  3. Simplified84.0%

    \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
  4. Step-by-step derivation
    1. associate-*r/71.7%

      \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    2. fma-udef57.2%

      \[\leadsto \frac{y \cdot x}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    3. cube-mult57.1%

      \[\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.7%

      \[\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.7%

      \[\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.7%

      \[\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-times90.0%

      \[\leadsto \color{blue}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}} \]
    8. associate-*l/85.2%

      \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{\left(x + y\right) \cdot \left(x + y\right)}} \]
    9. associate-/r*90.1%

      \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{x + \left(y + 1\right)}}{x + y}}{x + y}} \]
    10. associate-+r+90.1%

      \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(x + y\right) + 1}}}{x + y}}{x + y} \]
    11. +-commutative90.1%

      \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{\left(y + x\right)} + 1}}{x + y}}{x + y} \]
    12. associate-+l+90.1%

      \[\leadsto \frac{\frac{y \cdot \frac{x}{\color{blue}{y + \left(x + 1\right)}}}{x + y}}{x + y} \]
  5. Applied egg-rr90.1%

    \[\leadsto \color{blue}{\frac{\frac{y \cdot \frac{x}{y + \left(x + 1\right)}}{x + y}}{x + y}} \]
  6. Taylor expanded in x around 0 63.4%

    \[\leadsto \frac{\frac{\color{blue}{\frac{x \cdot y}{1 + y}}}{x + y}}{x + y} \]
  7. Step-by-step derivation
    1. *-commutative63.4%

      \[\leadsto \frac{\frac{\frac{\color{blue}{y \cdot x}}{1 + y}}{x + y}}{x + y} \]
    2. +-commutative63.4%

      \[\leadsto \frac{\frac{\frac{y \cdot x}{\color{blue}{y + 1}}}{x + y}}{x + y} \]
  8. Simplified63.4%

    \[\leadsto \frac{\frac{\color{blue}{\frac{y \cdot x}{y + 1}}}{x + y}}{x + y} \]
  9. Taylor expanded in x around 0 58.2%

    \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{x + y} \]
  10. Step-by-step derivation
    1. +-commutative58.2%

      \[\leadsto \frac{\frac{x}{\color{blue}{y + 1}}}{x + y} \]
  11. Simplified58.2%

    \[\leadsto \frac{\color{blue}{\frac{x}{y + 1}}}{x + y} \]
  12. Taylor expanded in y around 0 3.5%

    \[\leadsto \color{blue}{1} \]
  13. Final simplification3.5%

    \[\leadsto 1 \]

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 2023333 
(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))))