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

Percentage Accurate: 69.9% → 99.8%
Time: 13.7s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

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

\\
\frac{x \cdot \frac{\frac{y}{x + y}}{y + \left(x + 1\right)}}{x + y}
\end{array}
Derivation
  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. +-commutative65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{x + y}\\ \mathbf{if}\;y \leq -4 \cdot 10^{+50} \lor \neg \left(y \leq 1.35 \cdot 10^{-24}\right):\\ \;\;\;\;\frac{x \cdot \frac{t\_0}{x + y}}{x + y}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \frac{x}{\left(x + y\right) \cdot \left(x + 1\right)}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (+ x y))))
   (if (or (<= y -4e+50) (not (<= y 1.35e-24)))
     (/ (* x (/ t_0 (+ x y))) (+ x y))
     (* t_0 (/ x (* (+ x y) (+ x 1.0)))))))
double code(double x, double y) {
	double t_0 = y / (x + y);
	double tmp;
	if ((y <= -4e+50) || !(y <= 1.35e-24)) {
		tmp = (x * (t_0 / (x + y))) / (x + y);
	} else {
		tmp = t_0 * (x / ((x + y) * (x + 1.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 = y / (x + y)
    if ((y <= (-4d+50)) .or. (.not. (y <= 1.35d-24))) then
        tmp = (x * (t_0 / (x + y))) / (x + y)
    else
        tmp = t_0 * (x / ((x + y) * (x + 1.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = y / (x + y);
	double tmp;
	if ((y <= -4e+50) || !(y <= 1.35e-24)) {
		tmp = (x * (t_0 / (x + y))) / (x + y);
	} else {
		tmp = t_0 * (x / ((x + y) * (x + 1.0)));
	}
	return tmp;
}
def code(x, y):
	t_0 = y / (x + y)
	tmp = 0
	if (y <= -4e+50) or not (y <= 1.35e-24):
		tmp = (x * (t_0 / (x + y))) / (x + y)
	else:
		tmp = t_0 * (x / ((x + y) * (x + 1.0)))
	return tmp
function code(x, y)
	t_0 = Float64(y / Float64(x + y))
	tmp = 0.0
	if ((y <= -4e+50) || !(y <= 1.35e-24))
		tmp = Float64(Float64(x * Float64(t_0 / Float64(x + y))) / Float64(x + y));
	else
		tmp = Float64(t_0 * Float64(x / Float64(Float64(x + y) * Float64(x + 1.0))));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = y / (x + y);
	tmp = 0.0;
	if ((y <= -4e+50) || ~((y <= 1.35e-24)))
		tmp = (x * (t_0 / (x + y))) / (x + y);
	else
		tmp = t_0 * (x / ((x + y) * (x + 1.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -4e+50], N[Not[LessEqual[y, 1.35e-24]], $MachinePrecision]], N[(N[(x * N[(t$95$0 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{x + y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+50} \lor \neg \left(y \leq 1.35 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{x \cdot \frac{t\_0}{x + y}}{x + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.0000000000000003e50 or 1.35000000000000003e-24 < y

    1. Initial program 57.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. +-commutative57.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000003e50 < y < 1.35000000000000003e-24

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in x around inf 72.7%

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

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

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

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

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

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

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

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

Alternative 3: 83.7% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

    if 0.0140000000000000003 < y < 1.22e149

    1. Initial program 68.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. +-commutative68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.22e149 < y

    1. Initial program 66.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. +-commutative66.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.2% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 64.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. Add Preprocessing
    3. Taylor expanded in x around inf 61.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{1}}{y + x} \cdot y}{x + 1} \]
      4. *-commutative63.4%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{1}{y + x}}}{x + 1} \]
      5. associate-*r/63.5%

        \[\leadsto \frac{\color{blue}{\frac{y \cdot 1}{y + x}}}{x + 1} \]
      6. associate-*l/63.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{y + x} \cdot 1}}{x + 1} \]
      7. *-rgt-identity63.5%

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

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

    if 3.7999999999999999e-85 < y < 4.9999999999999999e146

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999999e146 < y

    1. Initial program 66.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. +-commutative66.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 66.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 64.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. Add Preprocessing
    3. Taylor expanded in x around inf 61.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{1}}{y + x} \cdot y}{x + 1} \]
      4. *-commutative63.4%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{1}{y + x}}}{x + 1} \]
      5. associate-*r/63.5%

        \[\leadsto \frac{\color{blue}{\frac{y \cdot 1}{y + x}}}{x + 1} \]
      6. associate-*l/63.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{y + x} \cdot 1}}{x + 1} \]
      7. *-rgt-identity63.5%

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

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

    if 5.0000000000000002e-85 < y < 7.1999999999999998e143

    1. Initial program 70.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. +-commutative70.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999998e143 < y

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 53.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-118}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\

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


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

    1. Initial program 61.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*82.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+82.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. Simplified82.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 40.8%

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

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

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

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

    if -2.7999999999999999e-143 < y < 5.5000000000000003e-118

    1. Initial program 63.7%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-/l*81.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+81.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. Simplified81.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. Taylor expanded in y around 0 84.5%

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

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

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

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

    if 5.5000000000000003e-118 < y < 1

    1. Initial program 75.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*81.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+81.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. Simplified81.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. Taylor expanded in x around 0 34.0%

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

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

    if 1 < y

    1. Initial program 67.6%

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

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

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

Alternative 7: 61.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+50}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-115}:\\
\;\;\;\;\frac{y}{x}\\

\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.0000000000000003e50 or 1 < y

    1. Initial program 57.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*78.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+78.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. Simplified78.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. Taylor expanded in x around 0 71.8%

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

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

    if -4.0000000000000003e50 < y < 4.20000000000000003e-115

    1. Initial program 71.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*84.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+84.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. Simplified84.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. Taylor expanded in y around 0 79.9%

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

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

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

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

    if 4.20000000000000003e-115 < y < 1

    1. Initial program 75.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*81.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+81.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. Simplified81.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. Taylor expanded in x around 0 34.0%

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

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

Alternative 8: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{y}{x + y}\\
\mathbf{if}\;y \leq 1.35 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{x \cdot t\_0}{x + y}}{x + 1}\\

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


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

    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. Add Preprocessing
    3. Taylor expanded in x around inf 62.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{x \cdot \frac{y}{y + x}}}{y + x}}{x + 1} \]
      4. div-inv87.0%

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

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

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

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

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

    if 1.35000000000000003e-24 < y

    1. Initial program 66.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. +-commutative66.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 57.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq -1.04 \cdot 10^{-147}:\\
\;\;\;\;\frac{y}{x}\\

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


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

    1. Initial program 64.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.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. Taylor expanded in y around 0 70.1%

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

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

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

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

    if -1 < x < -1.04000000000000003e-147

    1. Initial program 78.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*99.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+99.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. Simplified99.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. Taylor expanded in y around 0 49.4%

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

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

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

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

    if -1.04000000000000003e-147 < x

    1. Initial program 63.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*80.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+80.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. Simplified80.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 56.4%

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

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

Alternative 10: 99.8% accurate, 1.0× speedup?

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

\\
\frac{\frac{y}{x + y}}{x + y} \cdot \frac{x}{y + \left(x + 1\right)}
\end{array}
Derivation
  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. +-commutative65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.8% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 64.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. Add Preprocessing
    3. Taylor expanded in x around inf 61.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{1}}{y + x} \cdot y}{x + 1} \]
      4. *-commutative63.4%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{1}{y + x}}}{x + 1} \]
      5. associate-*r/63.5%

        \[\leadsto \frac{\color{blue}{\frac{y \cdot 1}{y + x}}}{x + 1} \]
      6. associate-*l/63.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{y + x} \cdot 1}}{x + 1} \]
      7. *-rgt-identity63.5%

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

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

    if 1.51999999999999994e-83 < y

    1. Initial program 68.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. +-commutative68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 61.9% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 64.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*82.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+82.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. Simplified82.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 62.8%

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

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

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

    if 7.79999999999999977e-85 < y

    1. Initial program 68.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. +-commutative68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 61.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 4.2 \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 4.2e-83) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
	double tmp;
	if (y <= 4.2e-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 <= 4.2d-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 <= 4.2e-83) {
		tmp = y / (x * (x + 1.0));
	} else {
		tmp = (x / y) / (y + 1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 4.2e-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 <= 4.2e-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 <= 4.2e-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, 4.2e-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 4.2 \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 < 4.1999999999999998e-83

    1. Initial program 64.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*82.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+82.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. Simplified82.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 62.8%

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

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

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

    if 4.1999999999999998e-83 < y

    1. Initial program 68.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*79.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+79.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. Simplified79.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. Taylor expanded in x around 0 64.2%

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

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

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

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

Alternative 14: 60.8% accurate, 1.4× speedup?

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

    1. Initial program 64.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*82.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+82.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. Simplified82.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 62.8%

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

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

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

    if 4.1999999999999998e-83 < y

    1. Initial program 68.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*79.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+79.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. Simplified79.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. Taylor expanded in x around 0 64.2%

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

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

Alternative 15: 34.0% accurate, 1.7× speedup?

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

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

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


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

    1. Initial program 68.8%

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

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

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

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

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

    if -1.04000000000000003e-147 < x

    1. Initial program 63.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*80.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+80.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. Simplified80.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 56.4%

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

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

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

        \[\leadsto \color{blue}{{\left(\frac{y}{x}\right)}^{-1}} \]
    8. Applied egg-rr38.7%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}}} \]
    10. Simplified38.7%

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

Alternative 16: 33.8% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 68.8%

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

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

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

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

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

    if -1.04000000000000003e-147 < x

    1. Initial program 63.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*80.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+80.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. Simplified80.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 56.4%

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

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

Alternative 17: 25.6% accurate, 5.7× speedup?

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

\\
\frac{x}{y}
\end{array}
Derivation
  1. Initial program 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*81.4%

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

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

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

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

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

Alternative 18: 3.5% accurate, 17.0× speedup?

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

\\
1
\end{array}
Derivation
  1. Initial program 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. Add Preprocessing
  3. Taylor expanded in x around inf 57.9%

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

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

    \[\leadsto \color{blue}{1} \]
  6. Add Preprocessing

Developer Target 1: 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 2024151 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :alt
  (! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))

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