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

Percentage Accurate: 68.9% → 99.8%
Time: 14.0s
Alternatives: 16
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 16 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{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.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.8% accurate, 0.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{t\_0}{\frac{x}{y}}}\\


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

    1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.60000000000000003e74 < x < 6.5e11

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5e11 < x

    1. Initial program 56.4%

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

        \[\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. associate-+l+59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 68.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \leq -3.3 \cdot 10^{-164}:\\
\;\;\;\;x \cdot \frac{y}{t\_0 \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}\\

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


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

    1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.46e22 < x < -3.3e-164

    1. Initial program 88.9%

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

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

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

    if -3.3e-164 < x

    1. Initial program 64.9%

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

        \[\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. associate-+l+76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 61.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
t_1 := \frac{\frac{y}{x + y}}{t\_0}\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -3.7 \cdot 10^{-106}:\\
\;\;\;\;\frac{1}{\frac{t\_0}{\frac{x}{y}}}\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.2e-73 or -3.69999999999999979e-106 < x < -1.84999999999999993e-146

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e-73 < x < -3.69999999999999979e-106

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.84999999999999993e-146 < x

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-73}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + \left(y + 1\right)}\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{-106}:\\ \;\;\;\;\frac{1}{\frac{x + \left(y + 1\right)}{\frac{x}{y}}}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-146}:\\ \;\;\;\;\frac{\frac{y}{x + y}}{x + \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
t_1 := \frac{\frac{y}{x}}{t\_0}\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -5.5 \cdot 10^{-108}:\\
\;\;\;\;\frac{1}{\frac{t\_0}{\frac{x}{y}}}\\

\mathbf{elif}\;x \leq -2 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.2499999999999999e-76 or -5.50000000000000031e-108 < x < -2e-140

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{\frac{y}{x}}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{\frac{y}{x}}}{x + \left(1 + y\right)}} \]
    10. Step-by-step derivation
      1. /-rgt-identity67.1%

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

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\frac{y}{x}} \cdot \sqrt[3]{\frac{y}{x}}\right)} \cdot \sqrt[3]{\frac{y}{x}}}{x + \left(1 + y\right)} \]
      4. rem-3cbrt-lft67.9%

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

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

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

    if -1.2499999999999999e-76 < x < -5.50000000000000031e-108

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-140 < x

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 61.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
t_1 := \frac{\frac{y}{x}}{t\_0}\\
\mathbf{if}\;x \leq -8.6 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq -4.5 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.5999999999999998e-75 or -5.50000000000000031e-108 < x < -4.50000000000000004e-140

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{\frac{y}{x}}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{\frac{y}{x}}}{x + \left(1 + y\right)}} \]
    10. Step-by-step derivation
      1. /-rgt-identity67.1%

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

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\frac{y}{x}} \cdot \sqrt[3]{\frac{y}{x}}\right)} \cdot \sqrt[3]{\frac{y}{x}}}{x + \left(1 + y\right)} \]
      4. rem-3cbrt-lft67.9%

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

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

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

    if -8.5999999999999998e-75 < x < -5.50000000000000031e-108

    1. Initial program 99.6%

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

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

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

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

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

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

    if -4.50000000000000004e-140 < x

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 61.4% accurate, 0.7× speedup?

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

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

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

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

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


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

    1. Initial program 70.0%

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

        \[\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. associate-+l+76.0%

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

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

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

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

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

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

    if -1.94999999999999991e-73 < x < -5.50000000000000031e-108

    1. Initial program 99.6%

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

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

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

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

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

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

    if -5.50000000000000031e-108 < x < -4.50000000000000004e-140

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000004e-140 < x

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 61.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 70.4%

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

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

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

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

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

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

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

    if -2.20000000000000007e-77 < x < -5.50000000000000031e-108

    1. Initial program 99.7%

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

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

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

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

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

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

    if -5.50000000000000031e-108 < x < -4.50000000000000004e-140

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000004e-140 < x

    1. Initial program 65.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y + 1}} \]
    9. Applied egg-rr57.4%

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

Alternative 9: 61.3% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 70.0%

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

        \[\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. associate-+l+76.0%

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

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

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

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

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

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

    if -5.8e-73 < x < -5.50000000000000031e-108

    1. Initial program 99.6%

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

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

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

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

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

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

    if -5.50000000000000031e-108 < x < -4.50000000000000004e-140

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000004e-140 < x

    1. Initial program 65.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y + 1}} \]
    9. Applied egg-rr57.4%

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

Alternative 10: 61.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq -4.5 \cdot 10^{-140}:\\
\;\;\;\;\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 4 regimes
  2. if x < -5.8e-74

    1. Initial program 70.0%

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

        \[\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. associate-+l+76.0%

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

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

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

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

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

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

    if -5.8e-74 < x < -5.50000000000000031e-108

    1. Initial program 99.6%

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

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

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

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

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

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

    if -5.50000000000000031e-108 < x < -4.50000000000000004e-140

    1. Initial program 83.5%

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

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

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

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

    if -4.50000000000000004e-140 < x

    1. Initial program 65.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y + 1}} \]
    9. Applied egg-rr57.4%

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

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

Alternative 11: 61.4% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 3 \cdot 10^{-83}:\\
\;\;\;\;\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 y < 3.0000000000000001e-83

    1. Initial program 66.3%

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

        \[\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. associate-+l+77.8%

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

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

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

    if 3.0000000000000001e-83 < y

    1. Initial program 72.5%

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

        \[\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. associate-+l+77.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y + 1}} \]
    9. Applied egg-rr66.9%

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

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

Alternative 12: 60.7% accurate, 1.4× speedup?

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

    1. Initial program 66.3%

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

        \[\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. associate-+l+77.8%

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

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

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

    if 1.65000000000000011e-82 < y

    1. Initial program 72.5%

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

        \[\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. associate-+l+77.2%

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

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

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

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

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

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

Alternative 13: 27.5% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -105 < x

    1. Initial program 69.0%

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

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

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

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

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

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

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

Alternative 14: 49.8% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

Alternative 15: 4.2% accurate, 5.7× speedup?

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

\\
\frac{1}{x}
\end{array}
Derivation
  1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{1}{\color{blue}{x}} \]
  9. Add Preprocessing

Alternative 16: 3.6% accurate, 8.5× speedup?

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

\\
-x
\end{array}
Derivation
  1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} \]
  12. Step-by-step derivation
    1. neg-mul-13.8%

      \[\leadsto \color{blue}{-x} \]
  13. Simplified3.8%

    \[\leadsto \color{blue}{-x} \]
  14. 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 2024086 
(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))))