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

Percentage Accurate: 69.1% → 99.8%
Time: 17.5s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 69.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e-23 < y < 1.7e122

    1. Initial program 81.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. times-frac99.7%

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

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

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

    if 1.7e122 < y

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.0% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e167 < x < -4.1000000000000002e-156

    1. Initial program 76.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. times-frac98.5%

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

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

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

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

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

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

    if -4.1000000000000002e-156 < x

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.8% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

    if -5.0000000000000002e46 < x < -6e-156

    1. Initial program 85.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-frac99.7%

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

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

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

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

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

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

    if -6e-156 < x

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 63.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 65.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-frac91.3%

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

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

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

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

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

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

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

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

    if -1.99999999999999989e-283 < y < 1.25e-28

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-28 < y

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 63.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 65.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-frac91.3%

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

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

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

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

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

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

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

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

    if -1.3999999999999999e-283 < y < 3.40000000000000003e-14

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.40000000000000003e-14 < y

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 81.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 7 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{\frac{x}{x + 1}}{y + x}\\

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


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

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

    if 7e15 < 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-/r*77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 52.8% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;x \leq -1.85 \cdot 10^{-138}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-156}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;x \leq 10^{-104}:\\
\;\;\;\;\frac{x}{y + x}\\

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


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

    1. Initial program 61.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. unpow277.3%

        \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
    6. Simplified77.3%

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

    if -1 < x < -4.59999999999999991e-91

    1. Initial program 86.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. 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. associate-+l+99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    7. Simplified43.9%

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

    if -4.59999999999999991e-91 < x < -1.84999999999999995e-138 or 9.99999999999999927e-105 < x

    1. Initial program 74.3%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x}{\color{blue}{\left(y + x\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}} \]
      10. fma-def87.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. +-commutative87.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. +-commutative87.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-unmult87.3%

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

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

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

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

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

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

    if -1.84999999999999995e-138 < x < -7.49999999999999959e-156

    1. Initial program 52.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-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. associate-+l+99.6%

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

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

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

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

    if -7.49999999999999959e-156 < x < 9.99999999999999927e-105

    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-+r+64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{-91}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-138}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-156}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 10^{-104}:\\ \;\;\;\;\frac{x}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 9: 53.4% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;x \leq -8 \cdot 10^{-140}:\\
\;\;\;\;\frac{x}{y \cdot y}\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-155}:\\
\;\;\;\;\frac{y}{x}\\

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

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


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

    1. Initial program 61.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. unpow277.3%

        \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
    6. Simplified77.3%

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

    if -1 < x < -8.99999999999999952e-91

    1. Initial program 86.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. 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. associate-+l+99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    7. Simplified43.9%

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

    if -8.99999999999999952e-91 < x < -7.9999999999999999e-140

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow251.7%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified51.7%

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

    if -7.9999999999999999e-140 < x < -8.00000000000000011e-155

    1. Initial program 52.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-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. associate-+l+99.6%

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

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

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

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

    if -8.00000000000000011e-155 < x < 6.60000000000000004e-104

    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-+r+64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.60000000000000004e-104 < x

    1. Initial program 71.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative87.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. *-commutative87.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-in84.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-def87.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. +-commutative87.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. +-commutative87.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-unmult87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{x}{x + y}}{\color{blue}{y}} \]
    7. Taylor expanded in x around 0 24.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -9 \cdot 10^{-91}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-140}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-155}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-104}:\\ \;\;\;\;\frac{x}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]

Alternative 10: 54.0% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;x \leq -1.25 \cdot 10^{-138}:\\
\;\;\;\;\frac{x}{y \cdot y}\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-155}:\\
\;\;\;\;\frac{y}{x}\\

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

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


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

    1. Initial program 61.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-frac92.3%

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

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

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

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

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

    if -1 < x < -5.20000000000000028e-91

    1. Initial program 86.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. 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. associate-+l+99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    7. Simplified43.9%

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

    if -5.20000000000000028e-91 < x < -1.24999999999999997e-138

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow251.7%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified51.7%

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

    if -1.24999999999999997e-138 < x < -8.00000000000000011e-155

    1. Initial program 52.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-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. associate-+l+99.6%

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

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

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

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

    if -8.00000000000000011e-155 < x < 2.49999999999999989e-104

    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-+r+64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999989e-104 < x

    1. Initial program 71.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\left(\left(y + x\right) \cdot \left(y + x\right)\right) \cdot \left(\left(y + x\right) + 1\right)} \cdot y} \]
      7. *-commutative87.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. *-commutative87.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-in84.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-def87.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. +-commutative87.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. +-commutative87.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-unmult87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{x}{x + y}}{\color{blue}{y}} \]
    7. Taylor expanded in x around 0 24.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{-91}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-138}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-155}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{x}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]

Alternative 11: 52.7% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-222}:\\
\;\;\;\;\frac{y}{x}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.00000000000000019e144 or 5.2e10 < y

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow278.4%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified78.4%

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

    if -8.00000000000000019e144 < y < 3.4000000000000001e-222

    1. Initial program 67.4%

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

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

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

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

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

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

    if 3.4000000000000001e-222 < y < 5.2e10

    1. Initial program 83.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-+r+83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+144}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-222}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 52000000000:\\ \;\;\;\;\frac{x}{y + x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 12: 60.3% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;x \leq -1.7 \cdot 10^{-90}:\\
\;\;\;\;\frac{y}{x} - y\\

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


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

    1. Initial program 61.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-frac92.3%

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

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

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

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

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

    if -1 < x < -1.69999999999999997e-90

    1. Initial program 86.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. 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. associate-+l+99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    7. Simplified43.9%

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

    if -1.69999999999999997e-90 < x

    1. Initial program 69.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-frac86.9%

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

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

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

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

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

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

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

Alternative 13: 60.4% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;x \leq -6.2 \cdot 10^{-91}:\\
\;\;\;\;\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 x < -1.85e167

    1. Initial program 53.3%

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

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

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

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

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

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

    if -1.85e167 < x < -6.19999999999999962e-91

    1. Initial program 74.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. times-frac98.2%

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

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

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

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

    if -6.19999999999999962e-91 < x

    1. Initial program 69.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-frac86.9%

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

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

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

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

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

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

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

Alternative 14: 62.4% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000001e-82 < y

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 62.6% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

    if 4e-82 < y

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 53.7% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+144} \lor \neg \left(y \leq 4.2 \cdot 10^{-34}\right):\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= y -8e+144) (not (<= y 4.2e-34))) (/ x (* y y)) (/ y x)))
double code(double x, double y) {
	double tmp;
	if ((y <= -8e+144) || !(y <= 4.2e-34)) {
		tmp = x / (y * y);
	} else {
		tmp = 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 <= (-8d+144)) .or. (.not. (y <= 4.2d-34))) then
        tmp = x / (y * y)
    else
        tmp = y / x
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if ((y <= -8e+144) || !(y <= 4.2e-34)) {
		tmp = x / (y * y);
	} else {
		tmp = y / x;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (y <= -8e+144) or not (y <= 4.2e-34):
		tmp = x / (y * y)
	else:
		tmp = y / x
	return tmp
function code(x, y)
	tmp = 0.0
	if ((y <= -8e+144) || !(y <= 4.2e-34))
		tmp = Float64(x / Float64(y * y));
	else
		tmp = Float64(y / x);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if ((y <= -8e+144) || ~((y <= 4.2e-34)))
		tmp = x / (y * y);
	else
		tmp = y / x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[y, -8e+144], N[Not[LessEqual[y, 4.2e-34]], $MachinePrecision]], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+144} \lor \neg \left(y \leq 4.2 \cdot 10^{-34}\right):\\
\;\;\;\;\frac{x}{y \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.00000000000000019e144 or 4.2000000000000002e-34 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow271.5%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified71.5%

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

    if -8.00000000000000019e144 < y < 4.2000000000000002e-34

    1. Initial program 70.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+144} \lor \neg \left(y \leq 4.2 \cdot 10^{-34}\right):\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \]

Alternative 17: 60.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 67.6%

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

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+94.0%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 70.3%

      \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
    5. Step-by-step derivation
      1. associate-/r*70.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{1 + x}} \]
      2. +-commutative70.9%

        \[\leadsto \frac{\frac{y}{x}}{\color{blue}{x + 1}} \]
    6. Simplified70.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x + 1}} \]

    if -1.3999999999999999e-90 < x

    1. Initial program 69.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-frac86.9%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. associate-+l+86.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified86.9%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 55.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. +-commutative55.0%

        \[\leadsto \frac{x}{y \cdot \color{blue}{\left(y + 1\right)}} \]
    6. Simplified55.0%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(y + 1\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \end{array} \]

Alternative 18: 4.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{1}{x} \end{array} \]
(FPCore (x y) :precision binary64 (/ 1.0 x))
double code(double x, double y) {
	return 1.0 / x;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 / x
end function
public static double code(double x, double y) {
	return 1.0 / x;
}
def code(x, y):
	return 1.0 / x
function code(x, y)
	return Float64(1.0 / x)
end
function tmp = code(x, y)
	tmp = 1.0 / x;
end
code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{x}
\end{array}
Derivation
  1. Initial program 68.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. times-frac89.4%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. associate-+l+89.4%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified89.4%

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
  4. Taylor expanded in x around inf 54.7%

    \[\leadsto \color{blue}{\frac{1}{x}} \cdot \frac{y}{x + \left(y + 1\right)} \]
  5. Taylor expanded in y around inf 4.2%

    \[\leadsto \color{blue}{\frac{1}{x}} \]
  6. Final simplification4.2%

    \[\leadsto \frac{1}{x} \]

Alternative 19: 26.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{y}{x} \end{array} \]
(FPCore (x y) :precision binary64 (/ y x))
double code(double x, double y) {
	return y / x;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = y / x
end function
public static double code(double x, double y) {
	return y / x;
}
def code(x, y):
	return y / x
function code(x, y)
	return Float64(y / x)
end
function tmp = code(x, y)
	tmp = y / x;
end
code[x_, y_] := N[(y / x), $MachinePrecision]
\begin{array}{l}

\\
\frac{y}{x}
\end{array}
Derivation
  1. Initial program 68.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. times-frac89.4%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. associate-+l+89.4%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified89.4%

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
  4. Taylor expanded in y around 0 53.9%

    \[\leadsto \color{blue}{\frac{y}{x \cdot \left(1 + x\right)}} \]
  5. Taylor expanded in x around 0 28.8%

    \[\leadsto \frac{y}{\color{blue}{x}} \]
  6. Final simplification28.8%

    \[\leadsto \frac{y}{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 2023279 
(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))))