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

Percentage Accurate: 68.6% → 99.8%
Time: 12.3s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 68.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 46.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/76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999988e136 < x < -2.9e-18

    1. Initial program 62.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-frac93.5%

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

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

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

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

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

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

    if -2.9e-18 < x

    1. Initial program 72.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/82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 68.1% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 53.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/76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.45e-15 < x < -8.5e-165

    1. Initial program 87.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-frac96.4%

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

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

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

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

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

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

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

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

    if -8.5e-165 < x

    1. Initial program 69.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/80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 80.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 53.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/76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.45e-15 < x

    1. Initial program 72.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/82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{x}{y + x}}{y + x} \cdot \frac{y}{x + \left(y + 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(Float64(x / Float64(y + x)) / Float64(y + x)) * Float64(y / Float64(x + Float64(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[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 61.9% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 64.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/79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e-85 < y

    1. Initial program 72.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/84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 54.7% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y \leq 1.36 \cdot 10^{-177}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+26}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.60000000000000002e-154 or 1.35999999999999989e-177 < y < 2.40000000000000005e26

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

    if -1.60000000000000002e-154 < y < 1.35999999999999989e-177

    1. Initial program 54.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-frac64.4%

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

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

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

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

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

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

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

    if 2.40000000000000005e26 < y

    1. Initial program 64.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/82.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
      2. div-inv78.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{-154}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{-177}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+26}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\ \end{array} \]

Alternative 8: 54.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{x \cdot x}\\ \mathbf{if}\;y \leq -1.36 \cdot 10^{-154}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{-179}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+26}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (* x x))))
   (if (<= y -1.36e-154)
     t_0
     (if (<= y 2.85e-179) (/ y x) (if (<= y 2.3e+26) t_0 (/ x (* y y)))))))
double code(double x, double y) {
	double t_0 = y / (x * x);
	double tmp;
	if (y <= -1.36e-154) {
		tmp = t_0;
	} else if (y <= 2.85e-179) {
		tmp = y / x;
	} else if (y <= 2.3e+26) {
		tmp = t_0;
	} 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) :: t_0
    real(8) :: tmp
    t_0 = y / (x * x)
    if (y <= (-1.36d-154)) then
        tmp = t_0
    else if (y <= 2.85d-179) then
        tmp = y / x
    else if (y <= 2.3d+26) then
        tmp = t_0
    else
        tmp = x / (y * y)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = y / (x * x);
	double tmp;
	if (y <= -1.36e-154) {
		tmp = t_0;
	} else if (y <= 2.85e-179) {
		tmp = y / x;
	} else if (y <= 2.3e+26) {
		tmp = t_0;
	} else {
		tmp = x / (y * y);
	}
	return tmp;
}
def code(x, y):
	t_0 = y / (x * x)
	tmp = 0
	if y <= -1.36e-154:
		tmp = t_0
	elif y <= 2.85e-179:
		tmp = y / x
	elif y <= 2.3e+26:
		tmp = t_0
	else:
		tmp = x / (y * y)
	return tmp
function code(x, y)
	t_0 = Float64(y / Float64(x * x))
	tmp = 0.0
	if (y <= -1.36e-154)
		tmp = t_0;
	elseif (y <= 2.85e-179)
		tmp = Float64(y / x);
	elseif (y <= 2.3e+26)
		tmp = t_0;
	else
		tmp = Float64(x / Float64(y * y));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = y / (x * x);
	tmp = 0.0;
	if (y <= -1.36e-154)
		tmp = t_0;
	elseif (y <= 2.85e-179)
		tmp = y / x;
	elseif (y <= 2.3e+26)
		tmp = t_0;
	else
		tmp = x / (y * y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.36e-154], t$95$0, If[LessEqual[y, 2.85e-179], N[(y / x), $MachinePrecision], If[LessEqual[y, 2.3e+26], t$95$0, N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.85 \cdot 10^{-179}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+26}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.36e-154 or 2.85e-179 < y < 2.3000000000000001e26

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

    if -1.36e-154 < y < 2.85e-179

    1. Initial program 54.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-frac64.4%

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

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

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

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

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

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

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

    if 2.3000000000000001e26 < y

    1. Initial program 64.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/82.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.36 \cdot 10^{-154}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{-179}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+26}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 9: 54.7% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{x \cdot x}\\ \mathbf{if}\;y \leq -1.95 \cdot 10^{-154}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{-177}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+26}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (* x x))))
   (if (<= y -1.95e-154)
     t_0
     (if (<= y 4.9e-177) (/ y x) (if (<= y 2.4e+26) t_0 (/ (/ x y) y))))))
double code(double x, double y) {
	double t_0 = y / (x * x);
	double tmp;
	if (y <= -1.95e-154) {
		tmp = t_0;
	} else if (y <= 4.9e-177) {
		tmp = y / x;
	} else if (y <= 2.4e+26) {
		tmp = t_0;
	} 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) :: t_0
    real(8) :: tmp
    t_0 = y / (x * x)
    if (y <= (-1.95d-154)) then
        tmp = t_0
    else if (y <= 4.9d-177) then
        tmp = y / x
    else if (y <= 2.4d+26) then
        tmp = t_0
    else
        tmp = (x / y) / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = y / (x * x);
	double tmp;
	if (y <= -1.95e-154) {
		tmp = t_0;
	} else if (y <= 4.9e-177) {
		tmp = y / x;
	} else if (y <= 2.4e+26) {
		tmp = t_0;
	} else {
		tmp = (x / y) / y;
	}
	return tmp;
}
def code(x, y):
	t_0 = y / (x * x)
	tmp = 0
	if y <= -1.95e-154:
		tmp = t_0
	elif y <= 4.9e-177:
		tmp = y / x
	elif y <= 2.4e+26:
		tmp = t_0
	else:
		tmp = (x / y) / y
	return tmp
function code(x, y)
	t_0 = Float64(y / Float64(x * x))
	tmp = 0.0
	if (y <= -1.95e-154)
		tmp = t_0;
	elseif (y <= 4.9e-177)
		tmp = Float64(y / x);
	elseif (y <= 2.4e+26)
		tmp = t_0;
	else
		tmp = Float64(Float64(x / y) / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = y / (x * x);
	tmp = 0.0;
	if (y <= -1.95e-154)
		tmp = t_0;
	elseif (y <= 4.9e-177)
		tmp = y / x;
	elseif (y <= 2.4e+26)
		tmp = t_0;
	else
		tmp = (x / y) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.95e-154], t$95$0, If[LessEqual[y, 4.9e-177], N[(y / x), $MachinePrecision], If[LessEqual[y, 2.4e+26], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 4.9 \cdot 10^{-177}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+26}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.95000000000000016e-154 or 4.89999999999999987e-177 < y < 2.40000000000000005e26

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

    if -1.95000000000000016e-154 < y < 4.89999999999999987e-177

    1. Initial program 54.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-frac64.4%

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

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

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

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

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

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

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

    if 2.40000000000000005e26 < y

    1. Initial program 64.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/82.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
      2. div-inv78.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{-154}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{-177}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+26}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]

Alternative 10: 60.9% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq -3.7 \cdot 10^{-57}:\\
\;\;\;\;\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 52.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/76.6%

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

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

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

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

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

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

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

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

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

    if -1 < x < -3.7e-57

    1. Initial program 85.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-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. /-rgt-identity99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    7. Simplified30.1%

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

    if -3.7e-57 < x

    1. Initial program 71.5%

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

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

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

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

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

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified86.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 x around 0 61.8%

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

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

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

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

Alternative 11: 61.1% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000023e-85 < y

    1. Initial program 72.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/84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 61.4% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 64.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/79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.9%

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

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

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

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

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

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

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

    if 5.8000000000000004e-85 < y

    1. Initial program 72.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/84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. associate-*r/99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 59.7% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 64.5%

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

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

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

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

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

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

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

    if 5.8000000000000004e-85 < y

    1. Initial program 72.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-frac96.0%

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

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

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

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

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified96.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 x around 0 69.4%

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

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

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

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

Alternative 14: 60.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 5.8 \cdot 10^{-85}:\\ \;\;\;\;\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 (<= y 5.8e-85) (/ (/ y x) (+ x 1.0)) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
	double tmp;
	if (y <= 5.8e-85) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= 5.8d-85) then
        tmp = (y / x) / (x + 1.0d0)
    else
        tmp = x / (y * (y + 1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= 5.8e-85) {
		tmp = (y / x) / (x + 1.0);
	} else {
		tmp = x / (y * (y + 1.0));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 5.8e-85:
		tmp = (y / x) / (x + 1.0)
	else:
		tmp = x / (y * (y + 1.0))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 5.8e-85)
		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 (y <= 5.8e-85)
		tmp = (y / x) / (x + 1.0);
	else
		tmp = x / (y * (y + 1.0));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 5.8e-85], 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}\;y \leq 5.8 \cdot 10^{-85}:\\
\;\;\;\;\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 y < 5.8000000000000004e-85

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.8000000000000004e-85 < y

    1. Initial program 72.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-frac96.0%

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

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

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

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

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified96.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 x around 0 69.4%

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

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

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

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

Alternative 15: 42.9% accurate, 2.4× speedup?

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

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

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


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

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

    if 5.8e-49 < y

    1. Initial program 69.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/83.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.8 \cdot 10^{-49}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 16: 4.2% accurate, 5.7× speedup?

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

\\
\frac{1}{y}
\end{array}
Derivation
  1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{y}} \]
  8. Final simplification4.4%

    \[\leadsto \frac{1}{y} \]

Alternative 17: 25.6% 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 67.2%

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

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

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

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

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

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

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

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

    \[\leadsto \frac{y}{\color{blue}{x}} \]
  6. Final simplification21.2%

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

Alternative 18: 3.5% accurate, 17.0× speedup?

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

\\
1
\end{array}
Derivation
  1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  10. Final simplification3.5%

    \[\leadsto 1 \]

Developer target: 99.8% accurate, 0.9× speedup?

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

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

Reproduce

?
herbie shell --seed 2023230 
(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))))