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

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

\\
\frac{\frac{x}{x + y} \cdot \frac{y}{x + y}}{x + \left(y + 1\right)}
\end{array}
Derivation
  1. Initial program 68.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. Add Preprocessing
  3. Step-by-step derivation
    1. times-frac89.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 39.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative39.7%

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

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

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

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

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr81.7%

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

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

    if -5.49999999999999986e70 < x < -6.79999999999999964e-161

    1. Initial program 90.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. Add Preprocessing

    if -6.79999999999999964e-161 < x

    1. Initial program 69.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. Add Preprocessing
    3. Taylor expanded in x around 0 51.7%

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

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

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

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

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

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

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

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

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

Alternative 3: 65.7% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 42.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative42.1%

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

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

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

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

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr72.2%

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

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

    if -6.00000000000000001e164 < x < -5.0499999999999997e-138

    1. Initial program 77.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0499999999999997e-138 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.5%

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

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

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

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

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

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

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

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

Alternative 4: 63.7% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative69.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{x + {x}^{2}}} \]
    8. Step-by-step derivation
      1. *-rgt-identity58.7%

        \[\leadsto \frac{y}{\color{blue}{x \cdot 1} + {x}^{2}} \]
      2. unpow258.7%

        \[\leadsto \frac{y}{x \cdot 1 + \color{blue}{x \cdot x}} \]
      3. distribute-lft-in58.7%

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

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

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

    if 1e-175 < y < 1.80000000000000004e155

    1. Initial program 68.5%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative68.5%

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

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

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

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

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr92.2%

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

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

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

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

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

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

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

    if 1.80000000000000004e155 < y

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in x around 0 82.3%

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

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

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

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

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

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

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

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

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

Alternative 5: 60.6% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 66.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative66.4%

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

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

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

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

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr90.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{x + {x}^{2}}} \]
    8. Step-by-step derivation
      1. *-rgt-identity55.3%

        \[\leadsto \frac{y}{\color{blue}{x \cdot 1} + {x}^{2}} \]
      2. unpow255.3%

        \[\leadsto \frac{y}{x \cdot 1 + \color{blue}{x \cdot x}} \]
      3. distribute-lft-in55.4%

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

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

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

    if -5.0499999999999997e-138 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.5%

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

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

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

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

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

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

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

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

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

Alternative 6: 60.2% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 66.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. Add Preprocessing
    3. Taylor expanded in y around 0 55.4%

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

    if -5.0499999999999997e-138 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.5%

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

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

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

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

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

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

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

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

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

Alternative 7: 59.7% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 66.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. Add Preprocessing
    3. Taylor expanded in y around 0 55.4%

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

    if -5.0499999999999997e-138 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.5%

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

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

Alternative 8: 44.0% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative69.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{x + {x}^{2}}} \]
    8. Step-by-step derivation
      1. *-rgt-identity59.1%

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

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

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

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

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

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

    if 1.8999999999999998e-183 < y

    1. Initial program 67.4%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 57.9%

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

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

Alternative 9: 34.9% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 66.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. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative66.4%

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

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

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

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

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

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

        \[\leadsto \frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) + \color{blue}{{\left(x + y\right)}^{2}}} \]
    4. Applied egg-rr90.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{x + {x}^{2}}} \]
    8. Step-by-step derivation
      1. *-rgt-identity55.3%

        \[\leadsto \frac{y}{\color{blue}{x \cdot 1} + {x}^{2}} \]
      2. unpow255.3%

        \[\leadsto \frac{y}{x \cdot 1 + \color{blue}{x \cdot x}} \]
      3. distribute-lft-in55.4%

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

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

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

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

    if -5.0499999999999997e-138 < x

    1. Initial program 70.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.5%

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

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

Alternative 10: 27.4% accurate, 5.7× speedup?

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

\\
\frac{x}{y}
\end{array}
Derivation
  1. Initial program 68.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. Add Preprocessing
  3. Taylor expanded in x around 0 47.7%

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

    \[\leadsto \color{blue}{\frac{x}{y}} \]
  5. Add Preprocessing

Developer target: 99.8% accurate, 0.9× speedup?

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

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

Reproduce

?
herbie shell --seed 2024096 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :alt
  (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))

  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))