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

Percentage Accurate: 67.9% → 99.8%
Time: 16.1s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 67.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

\\
\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{y + x}}{y + x}
\end{array}
Derivation
  1. Initial program 72.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*72.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. +-commutative72.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. +-commutative72.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. +-commutative72.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*72.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. *-commutative72.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. associate-*r/84.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. *-commutative84.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-in68.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-def84.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. +-commutative84.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. +-commutative84.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-unmult84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.8% accurate, 0.9× speedup?

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

\mathbf{elif}\;x \leq -8 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{y + 1} \cdot \frac{x}{\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 < -3.75e9

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.75e9 < x < -8.00000000000000005e-150

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

    if -8.00000000000000005e-150 < x

    1. Initial program 73.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*73.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. +-commutative73.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. +-commutative73.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. +-commutative73.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. *-commutative73.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.6% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 64.2%

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

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

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

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

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

    if -2.05e6 < x

    1. Initial program 74.7%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*74.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. +-commutative74.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. +-commutative74.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. +-commutative74.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*74.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. *-commutative74.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. associate-*r/85.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. *-commutative85.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-in77.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-def85.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. +-commutative85.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. +-commutative85.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-unmult85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.6% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 64.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*64.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. +-commutative64.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. +-commutative64.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. +-commutative64.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. *-commutative64.2%

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

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

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

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

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

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

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

    if -2.05e6 < x

    1. Initial program 74.7%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*74.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. +-commutative74.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. +-commutative74.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. +-commutative74.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*74.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. *-commutative74.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. associate-*r/85.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. *-commutative85.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-in77.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-def85.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. +-commutative85.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. +-commutative85.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-unmult85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 63.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;\frac{t_0}{y}\\

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

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


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

    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. associate-*r/84.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in65.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-def84.1%

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

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

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

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

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

      \[\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/70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-126 < y < 2.8999999999999998e-7

    1. Initial program 91.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*91.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. +-commutative91.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. +-commutative91.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. +-commutative91.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. *-commutative91.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.8999999999999998e-7 < y < 3.65e148

    1. Initial program 69.5%

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

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

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

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

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

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

    if 3.65e148 < y

    1. Initial program 71.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*71.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. +-commutative71.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. +-commutative71.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. +-commutative71.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. *-commutative71.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\ \mathbf{elif}\;y \leq 3.65 \cdot 10^{+148}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y + \left(x + 1\right)} \cdot \frac{1}{y}\\ \end{array} \]

Alternative 6: 66.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 69.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*69.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. +-commutative69.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. +-commutative69.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. +-commutative69.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*69.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. *-commutative69.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. associate-*r/83.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. *-commutative83.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-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.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/69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.76000000000000001e-152 < y < 29

    1. Initial program 90.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*90.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. +-commutative90.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. +-commutative90.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. +-commutative90.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. *-commutative90.2%

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

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

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

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

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

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

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

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

    if 29 < y

    1. Initial program 68.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*68.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. +-commutative68.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. +-commutative68.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. +-commutative68.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*68.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. *-commutative68.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. associate-*r/81.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. *-commutative81.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-in72.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-def81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 81.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1e10 < x

    1. Initial program 74.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*74.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. +-commutative74.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. +-commutative74.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. +-commutative74.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*74.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. *-commutative74.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. associate-*r/85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 65.6% accurate, 1.1× speedup?

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

\mathbf{elif}\;y \leq 45:\\
\;\;\;\;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 y < 1.76000000000000001e-152

    1. Initial program 69.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*69.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. +-commutative69.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. +-commutative69.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. +-commutative69.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*69.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. *-commutative69.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. associate-*r/83.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. *-commutative83.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-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.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/69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.76000000000000001e-152 < y < 45

    1. Initial program 90.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*90.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. +-commutative90.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. +-commutative90.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. +-commutative90.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. *-commutative90.2%

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

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

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

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

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

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

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

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

    if 45 < y

    1. Initial program 68.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*68.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. +-commutative68.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. +-commutative68.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. +-commutative68.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. *-commutative68.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.76 \cdot 10^{-152}:\\ \;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\ \mathbf{elif}\;y \leq 45:\\ \;\;\;\;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 9: 66.0% accurate, 1.1× speedup?

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

\mathbf{elif}\;y \leq 8.5:\\
\;\;\;\;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 y < 1.76000000000000001e-152

    1. Initial program 69.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*69.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. +-commutative69.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. +-commutative69.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. +-commutative69.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*69.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. *-commutative69.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. associate-*r/83.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. *-commutative83.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-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.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/69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.76000000000000001e-152 < y < 8.5

    1. Initial program 90.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*90.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. +-commutative90.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. +-commutative90.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. +-commutative90.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. *-commutative90.2%

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

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

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

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

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

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

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

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

    if 8.5 < y

    1. Initial program 68.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*68.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. +-commutative68.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. +-commutative68.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. +-commutative68.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. *-commutative68.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.76 \cdot 10^{-152}:\\ \;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{y + x}\\ \mathbf{elif}\;y \leq 8.5:\\ \;\;\;\;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 10: 55.6% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -17500000000:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{-168} \lor \neg \left(x \leq 6.8 \cdot 10^{-193}\right):\\ \;\;\;\;\frac{1}{y} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -17500000000.0)
   (/ (/ y x) x)
   (if (or (<= x -3.9e-168) (not (<= x 6.8e-193)))
     (* (/ 1.0 y) (/ x y))
     (/ x y))))
double code(double x, double y) {
	double tmp;
	if (x <= -17500000000.0) {
		tmp = (y / x) / x;
	} else if ((x <= -3.9e-168) || !(x <= 6.8e-193)) {
		tmp = (1.0 / y) * (x / y);
	} else {
		tmp = x / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-17500000000.0d0)) then
        tmp = (y / x) / x
    else if ((x <= (-3.9d-168)) .or. (.not. (x <= 6.8d-193))) then
        tmp = (1.0d0 / y) * (x / y)
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -17500000000.0) {
		tmp = (y / x) / x;
	} else if ((x <= -3.9e-168) || !(x <= 6.8e-193)) {
		tmp = (1.0 / y) * (x / y);
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -17500000000.0:
		tmp = (y / x) / x
	elif (x <= -3.9e-168) or not (x <= 6.8e-193):
		tmp = (1.0 / y) * (x / y)
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -17500000000.0)
		tmp = Float64(Float64(y / x) / x);
	elseif ((x <= -3.9e-168) || !(x <= 6.8e-193))
		tmp = Float64(Float64(1.0 / y) * Float64(x / y));
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -17500000000.0)
		tmp = (y / x) / x;
	elseif ((x <= -3.9e-168) || ~((x <= 6.8e-193)))
		tmp = (1.0 / y) * (x / y);
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -17500000000.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[x, -3.9e-168], N[Not[LessEqual[x, 6.8e-193]], $MachinePrecision]], N[(N[(1.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.9 \cdot 10^{-168} \lor \neg \left(x \leq 6.8 \cdot 10^{-193}\right):\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{y}\\

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


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

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity76.8%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{{x}^{2}} \]
      2. unpow276.8%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{x \cdot x}} \]
      3. times-frac83.4%

        \[\leadsto \color{blue}{\frac{1}{x} \cdot \frac{y}{x}} \]
    6. Applied egg-rr83.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]
    8. Simplified83.4%

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

    if -1.75e10 < x < -3.90000000000000012e-168 or 6.8000000000000004e-193 < x

    1. Initial program 79.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*79.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. +-commutative79.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. +-commutative79.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. +-commutative79.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. *-commutative79.6%

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

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

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

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

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

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

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

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

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

    if -3.90000000000000012e-168 < x < 6.8000000000000004e-193

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -17500000000:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{-168} \lor \neg \left(x \leq 6.8 \cdot 10^{-193}\right):\\ \;\;\;\;\frac{1}{y} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 11: 60.3% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 57.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*57.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. +-commutative57.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. +-commutative57.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. +-commutative57.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*57.2%

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

        \[\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. associate-*r/77.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. *-commutative77.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-in36.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-def77.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. +-commutative77.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. +-commutative77.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-unmult77.7%

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

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

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

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity27.6%

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

        \[\leadsto \frac{1 \cdot y}{\color{blue}{x \cdot x}} \]
      3. times-frac35.5%

        \[\leadsto \color{blue}{\frac{1}{x} \cdot \frac{y}{x}} \]
    6. Applied egg-rr35.5%

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]
    8. Simplified35.6%

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

    if -2.4500000000000001e32 < y < 1.5500000000000001e-126

    1. Initial program 76.5%

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

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

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

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

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

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

    if 1.5500000000000001e-126 < y

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

Alternative 12: 61.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\

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

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


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

    1. Initial program 57.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*l*57.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. +-commutative57.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. +-commutative57.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. +-commutative57.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*57.2%

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

        \[\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. associate-*r/77.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. *-commutative77.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-in36.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-def77.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. +-commutative77.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. +-commutative77.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-unmult77.7%

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

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

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

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity27.6%

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

        \[\leadsto \frac{1 \cdot y}{\color{blue}{x \cdot x}} \]
      3. times-frac35.5%

        \[\leadsto \color{blue}{\frac{1}{x} \cdot \frac{y}{x}} \]
    6. Applied egg-rr35.5%

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]
    8. Simplified35.6%

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

    if -2.4500000000000001e32 < y < 5.99999999999999972e-130

    1. Initial program 76.5%

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

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

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

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

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

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

    if 5.99999999999999972e-130 < y

    1. Initial program 76.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*76.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. +-commutative76.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. +-commutative76.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. +-commutative76.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*76.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. *-commutative76.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. associate-*r/86.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. *-commutative86.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-in75.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-def86.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. +-commutative86.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. +-commutative86.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-unmult86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 61.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\ \;\;\;\;\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 (<= y 1.8e-126) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
	double tmp;
	if (y <= 1.8e-126) {
		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 (y <= 1.8d-126) 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 (y <= 1.8e-126) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + 1.0)) / (y + x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 1.8e-126:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = (x / (y + 1.0)) / (y + x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 1.8e-126)
		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 (y <= 1.8e-126)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = (x / (y + 1.0)) / (y + x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 1.8e-126], 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}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\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 y < 1.8e-126

    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. times-frac87.4%

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

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

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

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

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

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

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

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

    if 1.8e-126 < y

    1. Initial program 76.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*76.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. +-commutative76.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. +-commutative76.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. +-commutative76.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*76.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. *-commutative76.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. associate-*r/86.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. *-commutative86.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-in75.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-def86.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. +-commutative86.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. +-commutative86.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-unmult86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \]

Alternative 14: 61.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\ \;\;\;\;\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 (<= y 1.8e-126) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
	double tmp;
	if (y <= 1.8e-126) {
		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 (y <= 1.8d-126) 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 (y <= 1.8e-126) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 1.8e-126:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = (x / (y + (x + 1.0))) / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 1.8e-126)
		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 (y <= 1.8e-126)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = (x / (y + (x + 1.0))) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 1.8e-126], 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}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\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 y < 1.8e-126

    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. times-frac87.4%

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

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

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

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

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

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

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

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

    if 1.8e-126 < y

    1. Initial program 76.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*76.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. +-commutative76.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. +-commutative76.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. +-commutative76.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. *-commutative76.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 61.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\ \;\;\;\;\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 (<= y 1.8e-126) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
	double tmp;
	if (y <= 1.8e-126) {
		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 (y <= 1.8d-126) 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 (y <= 1.8e-126) {
		tmp = (y / (x + 1.0)) / (y + x);
	} else {
		tmp = (x / (y + (x + 1.0))) / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 1.8e-126:
		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 (y <= 1.8e-126)
		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 (y <= 1.8e-126)
		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[y, 1.8e-126], 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}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\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 y < 1.8e-126

    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. associate-*r/84.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in65.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-def84.1%

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

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

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

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

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

      \[\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/70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-126 < y

    1. Initial program 76.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*76.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. +-commutative76.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. +-commutative76.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. +-commutative76.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. *-commutative76.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 61.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity76.8%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{{x}^{2}} \]
      2. unpow276.8%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{x \cdot x}} \]
      3. times-frac83.4%

        \[\leadsto \color{blue}{\frac{1}{x} \cdot \frac{y}{x}} \]
    6. Applied egg-rr83.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]
    8. Simplified83.4%

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

    if -6.2e9 < x

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

Alternative 17: 61.2% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.8e-126

    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. times-frac87.4%

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

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

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

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

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

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

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

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

    if 1.8e-126 < y

    1. Initial program 76.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*76.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. +-commutative76.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. +-commutative76.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. +-commutative76.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*76.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. *-commutative76.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. associate-*r/86.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. *-commutative86.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-in75.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-def86.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. +-commutative86.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. +-commutative86.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-unmult86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \]

Alternative 18: 26.2% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2600000000:\\ \;\;\;\;\frac{0.5}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -2600000000.0) (/ 0.5 (+ y x)) (/ x y)))
double code(double x, double y) {
	double tmp;
	if (x <= -2600000000.0) {
		tmp = 0.5 / (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 <= (-2600000000.0d0)) then
        tmp = 0.5d0 / (y + x)
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -2600000000.0) {
		tmp = 0.5 / (y + x);
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -2600000000.0:
		tmp = 0.5 / (y + x)
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -2600000000.0)
		tmp = Float64(0.5 / Float64(y + x));
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -2600000000.0)
		tmp = 0.5 / (y + x);
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -2600000000.0], N[(0.5 / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e9 < x

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2600000000:\\ \;\;\;\;\frac{0.5}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 19: 42.7% accurate, 2.4× speedup?

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

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

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


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

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
    6. Applied egg-rr76.8%

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

    if -2.1e9 < x

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2100000000:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 20: 43.8% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2100000000:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -2100000000.0) (/ (/ y x) x) (/ x y)))
double code(double x, double y) {
	double tmp;
	if (x <= -2100000000.0) {
		tmp = (y / x) / 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 <= (-2100000000.0d0)) then
        tmp = (y / x) / x
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -2100000000.0) {
		tmp = (y / x) / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -2100000000.0:
		tmp = (y / x) / x
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -2100000000.0)
		tmp = Float64(Float64(y / x) / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -2100000000.0)
		tmp = (y / x) / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -2100000000.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.1e9

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified83.1%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in x around inf 76.8%

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity76.8%

        \[\leadsto \frac{\color{blue}{1 \cdot y}}{{x}^{2}} \]
      2. unpow276.8%

        \[\leadsto \frac{1 \cdot y}{\color{blue}{x \cdot x}} \]
      3. times-frac83.4%

        \[\leadsto \color{blue}{\frac{1}{x} \cdot \frac{y}{x}} \]
    6. Applied egg-rr83.4%

      \[\leadsto \color{blue}{\frac{1}{x} \cdot \frac{y}{x}} \]
    7. Step-by-step derivation
      1. associate-*l/83.4%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x}}{x}} \]
      2. *-lft-identity83.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]
    8. Simplified83.4%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x}} \]

    if -2.1e9 < x

    1. Initial program 74.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.2%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      3. associate-+l+89.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{y + \left(x + 1\right)}} \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{y + \left(x + 1\right)}} \]
    4. Taylor expanded in x around 0 50.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative50.0%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified50.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    7. Taylor expanded in y around 0 29.0%

      \[\leadsto \frac{x}{\color{blue}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2100000000:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 21: 26.1% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7500000000:\\ \;\;\;\;\frac{0.5}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y) :precision binary64 (if (<= x -7500000000.0) (/ 0.5 x) (/ x y)))
double code(double x, double y) {
	double tmp;
	if (x <= -7500000000.0) {
		tmp = 0.5 / 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 <= (-7500000000.0d0)) then
        tmp = 0.5d0 / x
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -7500000000.0) {
		tmp = 0.5 / x;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -7500000000.0:
		tmp = 0.5 / x
	else:
		tmp = x / y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -7500000000.0)
		tmp = Float64(0.5 / x);
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -7500000000.0)
		tmp = 0.5 / x;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -7500000000.0], N[(0.5 / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7500000000:\\
\;\;\;\;\frac{0.5}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.5e9

    1. Initial program 63.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*63.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. +-commutative63.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. +-commutative63.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. +-commutative63.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*63.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. *-commutative63.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. associate-*r/83.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)}} \]
      8. *-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(\left(y + x\right) + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      9. distribute-rgt1-in40.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-def83.1%

        \[\leadsto y \cdot \frac{x}{\color{blue}{\mathsf{fma}\left(y + x, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)}} \]
      11. +-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(\color{blue}{x + y}, y + x, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      12. +-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, \color{blue}{x + y}, \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)\right)} \]
      13. cube-unmult83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
      14. +-commutative83.1%

        \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
    3. Simplified83.1%

      \[\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.7%

        \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. *-commutative63.7%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)} \]
      3. fma-udef38.5%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      4. cube-mult38.5%

        \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. distribute-rgt1-in63.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      6. *-commutative63.7%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      7. +-commutative63.7%

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)} \]
      8. associate-+r+63.7%

        \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(y + \left(x + 1\right)\right)}} \]
      9. frac-times89.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{y + \left(x + 1\right)}} \]
      10. *-commutative89.6%

        \[\leadsto \color{blue}{\frac{y}{y + \left(x + 1\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      11. associate-/r*99.7%

        \[\leadsto \frac{y}{y + \left(x + 1\right)} \cdot \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \]
      12. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{y + \left(x + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
      13. associate-+r+99.8%

        \[\leadsto \frac{\frac{y}{\color{blue}{\left(y + x\right) + 1}} \cdot \frac{x}{x + y}}{x + y} \]
      14. +-commutative99.8%

        \[\leadsto \frac{\frac{y}{\color{blue}{\left(x + y\right)} + 1} \cdot \frac{x}{x + y}}{x + y} \]
      15. associate-+l+99.8%

        \[\leadsto \frac{\frac{y}{\color{blue}{x + \left(y + 1\right)}} \cdot \frac{x}{x + y}}{x + y} \]
    5. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
    6. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{y}}} \cdot \frac{x}{x + y}}{x + y} \]
      2. frac-times98.9%

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{x + \left(y + 1\right)}{y} \cdot \left(x + y\right)}}}{x + y} \]
      3. *-un-lft-identity98.9%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{x + \left(y + 1\right)}{y} \cdot \left(x + y\right)}}{x + y} \]
      4. associate-+r+98.9%

        \[\leadsto \frac{\frac{x}{\frac{\color{blue}{\left(x + y\right) + 1}}{y} \cdot \left(x + y\right)}}{x + y} \]
      5. +-commutative98.9%

        \[\leadsto \frac{\frac{x}{\frac{\color{blue}{\left(y + x\right)} + 1}{y} \cdot \left(x + y\right)}}{x + y} \]
      6. associate-+r+98.9%

        \[\leadsto \frac{\frac{x}{\frac{\color{blue}{y + \left(x + 1\right)}}{y} \cdot \left(x + y\right)}}{x + y} \]
      7. +-commutative98.9%

        \[\leadsto \frac{\frac{x}{\frac{y + \left(x + 1\right)}{y} \cdot \color{blue}{\left(y + x\right)}}}{x + y} \]
    7. Applied egg-rr98.9%

      \[\leadsto \frac{\color{blue}{\frac{x}{\frac{y + \left(x + 1\right)}{y} \cdot \left(y + x\right)}}}{x + y} \]
    8. Taylor expanded in y around -inf 20.0%

      \[\leadsto \frac{\frac{x}{\color{blue}{y + -1 \cdot \left(-1 \cdot x + -1 \cdot \left(1 + x\right)\right)}}}{x + y} \]
    9. Step-by-step derivation
      1. mul-1-neg20.0%

        \[\leadsto \frac{\frac{x}{y + \color{blue}{\left(-\left(-1 \cdot x + -1 \cdot \left(1 + x\right)\right)\right)}}}{x + y} \]
      2. unsub-neg20.0%

        \[\leadsto \frac{\frac{x}{\color{blue}{y - \left(-1 \cdot x + -1 \cdot \left(1 + x\right)\right)}}}{x + y} \]
      3. neg-mul-120.0%

        \[\leadsto \frac{\frac{x}{y - \left(\color{blue}{\left(-x\right)} + -1 \cdot \left(1 + x\right)\right)}}{x + y} \]
      4. +-commutative20.0%

        \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-1 \cdot \left(1 + x\right) + \left(-x\right)\right)}}}{x + y} \]
      5. unsub-neg20.0%

        \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-1 \cdot \left(1 + x\right) - x\right)}}}{x + y} \]
      6. distribute-lft-in20.0%

        \[\leadsto \frac{\frac{x}{y - \left(\color{blue}{\left(-1 \cdot 1 + -1 \cdot x\right)} - x\right)}}{x + y} \]
      7. metadata-eval20.0%

        \[\leadsto \frac{\frac{x}{y - \left(\left(\color{blue}{-1} + -1 \cdot x\right) - x\right)}}{x + y} \]
      8. neg-mul-120.0%

        \[\leadsto \frac{\frac{x}{y - \left(\left(-1 + \color{blue}{\left(-x\right)}\right) - x\right)}}{x + y} \]
      9. unsub-neg20.0%

        \[\leadsto \frac{\frac{x}{y - \left(\color{blue}{\left(-1 - x\right)} - x\right)}}{x + y} \]
    10. Simplified20.0%

      \[\leadsto \frac{\frac{x}{\color{blue}{y - \left(\left(-1 - x\right) - x\right)}}}{x + y} \]
    11. Taylor expanded in x around inf 6.2%

      \[\leadsto \color{blue}{\frac{0.5}{x}} \]

    if -7.5e9 < x

    1. Initial program 74.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.2%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. +-commutative89.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(y + x\right)} + 1} \]
      3. associate-+l+89.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{y + \left(x + 1\right)}} \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{y + \left(x + 1\right)}} \]
    4. Taylor expanded in x around 0 50.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative50.0%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified50.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
    7. Taylor expanded in y around 0 29.0%

      \[\leadsto \frac{x}{\color{blue}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification23.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7500000000:\\ \;\;\;\;\frac{0.5}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 22: 4.3% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{0.5}{x} \end{array} \]
(FPCore (x y) :precision binary64 (/ 0.5 x))
double code(double x, double y) {
	return 0.5 / x;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 0.5d0 / x
end function
public static double code(double x, double y) {
	return 0.5 / x;
}
def code(x, y):
	return 0.5 / x
function code(x, y)
	return Float64(0.5 / x)
end
function tmp = code(x, y)
	tmp = 0.5 / x;
end
code[x_, y_] := N[(0.5 / x), $MachinePrecision]
\begin{array}{l}

\\
\frac{0.5}{x}
\end{array}
Derivation
  1. Initial program 72.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*72.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. +-commutative72.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. +-commutative72.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. +-commutative72.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*72.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. *-commutative72.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. associate-*r/84.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. *-commutative84.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-in68.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-def84.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. +-commutative84.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. +-commutative84.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-unmult84.8%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(y + x\right)}^{3}}\right)} \]
    14. +-commutative84.8%

      \[\leadsto y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\color{blue}{\left(x + y\right)}}^{3}\right)} \]
  3. Simplified84.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/72.0%

      \[\leadsto \color{blue}{\frac{y \cdot x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    2. *-commutative72.0%

      \[\leadsto \frac{\color{blue}{x \cdot y}}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)} \]
    3. fma-udef60.7%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    4. cube-mult60.6%

      \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    5. distribute-rgt1-in72.0%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    6. *-commutative72.0%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
    7. +-commutative72.0%

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\color{blue}{\left(y + x\right)} + 1\right)} \]
    8. associate-+r+72.0%

      \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\left(y + \left(x + 1\right)\right)}} \]
    9. frac-times89.3%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{y + \left(x + 1\right)}} \]
    10. *-commutative89.3%

      \[\leadsto \color{blue}{\frac{y}{y + \left(x + 1\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \]
    11. associate-/r*99.7%

      \[\leadsto \frac{y}{y + \left(x + 1\right)} \cdot \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \]
    12. associate-*r/99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{y + \left(x + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
    13. associate-+r+99.8%

      \[\leadsto \frac{\frac{y}{\color{blue}{\left(y + x\right) + 1}} \cdot \frac{x}{x + y}}{x + y} \]
    14. +-commutative99.8%

      \[\leadsto \frac{\frac{y}{\color{blue}{\left(x + y\right)} + 1} \cdot \frac{x}{x + y}}{x + y} \]
    15. associate-+l+99.8%

      \[\leadsto \frac{\frac{y}{\color{blue}{x + \left(y + 1\right)}} \cdot \frac{x}{x + y}}{x + y} \]
  5. Applied egg-rr99.8%

    \[\leadsto \color{blue}{\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
  6. Step-by-step derivation
    1. clear-num99.8%

      \[\leadsto \frac{\color{blue}{\frac{1}{\frac{x + \left(y + 1\right)}{y}}} \cdot \frac{x}{x + y}}{x + y} \]
    2. frac-times99.0%

      \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{x + \left(y + 1\right)}{y} \cdot \left(x + y\right)}}}{x + y} \]
    3. *-un-lft-identity99.0%

      \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{x + \left(y + 1\right)}{y} \cdot \left(x + y\right)}}{x + y} \]
    4. associate-+r+99.0%

      \[\leadsto \frac{\frac{x}{\frac{\color{blue}{\left(x + y\right) + 1}}{y} \cdot \left(x + y\right)}}{x + y} \]
    5. +-commutative99.0%

      \[\leadsto \frac{\frac{x}{\frac{\color{blue}{\left(y + x\right)} + 1}{y} \cdot \left(x + y\right)}}{x + y} \]
    6. associate-+r+99.0%

      \[\leadsto \frac{\frac{x}{\frac{\color{blue}{y + \left(x + 1\right)}}{y} \cdot \left(x + y\right)}}{x + y} \]
    7. +-commutative99.0%

      \[\leadsto \frac{\frac{x}{\frac{y + \left(x + 1\right)}{y} \cdot \color{blue}{\left(y + x\right)}}}{x + y} \]
  7. Applied egg-rr99.0%

    \[\leadsto \frac{\color{blue}{\frac{x}{\frac{y + \left(x + 1\right)}{y} \cdot \left(y + x\right)}}}{x + y} \]
  8. Taylor expanded in y around -inf 42.5%

    \[\leadsto \frac{\frac{x}{\color{blue}{y + -1 \cdot \left(-1 \cdot x + -1 \cdot \left(1 + x\right)\right)}}}{x + y} \]
  9. Step-by-step derivation
    1. mul-1-neg42.5%

      \[\leadsto \frac{\frac{x}{y + \color{blue}{\left(-\left(-1 \cdot x + -1 \cdot \left(1 + x\right)\right)\right)}}}{x + y} \]
    2. unsub-neg42.5%

      \[\leadsto \frac{\frac{x}{\color{blue}{y - \left(-1 \cdot x + -1 \cdot \left(1 + x\right)\right)}}}{x + y} \]
    3. neg-mul-142.5%

      \[\leadsto \frac{\frac{x}{y - \left(\color{blue}{\left(-x\right)} + -1 \cdot \left(1 + x\right)\right)}}{x + y} \]
    4. +-commutative42.5%

      \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-1 \cdot \left(1 + x\right) + \left(-x\right)\right)}}}{x + y} \]
    5. unsub-neg42.5%

      \[\leadsto \frac{\frac{x}{y - \color{blue}{\left(-1 \cdot \left(1 + x\right) - x\right)}}}{x + y} \]
    6. distribute-lft-in42.5%

      \[\leadsto \frac{\frac{x}{y - \left(\color{blue}{\left(-1 \cdot 1 + -1 \cdot x\right)} - x\right)}}{x + y} \]
    7. metadata-eval42.5%

      \[\leadsto \frac{\frac{x}{y - \left(\left(\color{blue}{-1} + -1 \cdot x\right) - x\right)}}{x + y} \]
    8. neg-mul-142.5%

      \[\leadsto \frac{\frac{x}{y - \left(\left(-1 + \color{blue}{\left(-x\right)}\right) - x\right)}}{x + y} \]
    9. unsub-neg42.5%

      \[\leadsto \frac{\frac{x}{y - \left(\color{blue}{\left(-1 - x\right)} - x\right)}}{x + y} \]
  10. Simplified42.5%

    \[\leadsto \frac{\frac{x}{\color{blue}{y - \left(\left(-1 - x\right) - x\right)}}}{x + y} \]
  11. Taylor expanded in x around inf 4.4%

    \[\leadsto \color{blue}{\frac{0.5}{x}} \]
  12. Final simplification4.4%

    \[\leadsto \frac{0.5}{x} \]

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 2023308 
(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))))