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

Percentage Accurate: 68.5% → 99.8%
Time: 15.0s
Alternatives: 23
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 23 alternatives:

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

Initial Program: 68.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.3% accurate, 0.8× speedup?

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

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

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

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


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

    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. associate-*r/83.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. *-commutative83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999967e-125 < y < 3.6000000000000001e141

    1. Initial program 75.8%

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

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

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

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

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

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

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

    if 3.6000000000000001e141 < y

    1. Initial program 42.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.4% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.54999999999999996e-83 < y < 3.6000000000000001e141

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6000000000000001e141 < y

    1. Initial program 42.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.8% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{y}{1 + x}}{y + x}\right)\right)} \]
      2. expm1-udef32.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{y}{1 + x}}{y + x}\right)} - 1} \]
      3. associate-/l/32.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{\left(y + x\right) \cdot \left(1 + x\right)}}\right)} - 1 \]
      4. +-commutative32.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(1 + x\right)}\right)} - 1 \]
      5. +-commutative32.2%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\left(x + y\right) \cdot \left(x + 1\right)}\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def56.1%

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

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

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

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

    if 7.9999999999999996e-178 < y < 8.2000000000000006e-9

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000006e-9 < y

    1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 81.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6:\\
\;\;\;\;\frac{\frac{1}{\frac{y + \left(1 + x\right)}{y}}}{y + x}\\

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


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

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5999999999999996 < x

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 81.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.34999999999999998 < x

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 59.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.0)
   (/ (/ y x) x)
   (if (<= x -1.2e-97)
     (- (/ y x) y)
     (if (or (<= x -1.85e-137) (not (<= x -6.6e-171)))
       (/ x (+ y (* y y)))
       (/ y x)))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = (y / x) / x;
	} else if (x <= -1.2e-97) {
		tmp = (y / x) - y;
	} else if ((x <= -1.85e-137) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.0d0)) then
        tmp = (y / x) / x
    else if (x <= (-1.2d-97)) then
        tmp = (y / x) - y
    else if ((x <= (-1.85d-137)) .or. (.not. (x <= (-6.6d-171)))) then
        tmp = x / (y + (y * y))
    else
        tmp = y / x
    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.2e-97) {
		tmp = (y / x) - y;
	} else if ((x <= -1.85e-137) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.0:
		tmp = (y / x) / x
	elif x <= -1.2e-97:
		tmp = (y / x) - y
	elif (x <= -1.85e-137) or not (x <= -6.6e-171):
		tmp = x / (y + (y * y))
	else:
		tmp = y / x
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(Float64(y / x) / x);
	elseif (x <= -1.2e-97)
		tmp = Float64(Float64(y / x) - y);
	elseif ((x <= -1.85e-137) || !(x <= -6.6e-171))
		tmp = Float64(x / Float64(y + Float64(y * y)));
	else
		tmp = Float64(y / x);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.0)
		tmp = (y / x) / x;
	elseif (x <= -1.2e-97)
		tmp = (y / x) - y;
	elseif ((x <= -1.85e-137) || ~((x <= -6.6e-171)))
		tmp = x / (y + (y * y));
	else
		tmp = y / x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.2e-97], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[Or[LessEqual[x, -1.85e-137], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x} - y\\

\mathbf{elif}\;x \leq -1.85 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\

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


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

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x}}{x}} \]
      2. *-un-lft-identity71.1%

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

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

    if -1 < x < -1.2e-97

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e-97 < x < -1.85e-137 or -6.6000000000000004e-171 < x

    1. Initial program 67.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. times-frac87.1%

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

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

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

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

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

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

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

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

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

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

    if -1.85e-137 < x < -6.6000000000000004e-171

    1. Initial program 67.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. times-frac76.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \]

Alternative 8: 59.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+156}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-136} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -4.8e+156)
   (/ (/ y x) x)
   (if (<= x -1.2e-97)
     (/ y (* x (+ 1.0 x)))
     (if (or (<= x -8e-136) (not (<= x -6.6e-171)))
       (/ x (+ y (* y y)))
       (/ y x)))))
double code(double x, double y) {
	double tmp;
	if (x <= -4.8e+156) {
		tmp = (y / x) / x;
	} else if (x <= -1.2e-97) {
		tmp = y / (x * (1.0 + x));
	} else if ((x <= -8e-136) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-4.8d+156)) then
        tmp = (y / x) / x
    else if (x <= (-1.2d-97)) then
        tmp = y / (x * (1.0d0 + x))
    else if ((x <= (-8d-136)) .or. (.not. (x <= (-6.6d-171)))) then
        tmp = x / (y + (y * y))
    else
        tmp = y / x
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -4.8e+156) {
		tmp = (y / x) / x;
	} else if (x <= -1.2e-97) {
		tmp = y / (x * (1.0 + x));
	} else if ((x <= -8e-136) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -4.8e+156:
		tmp = (y / x) / x
	elif x <= -1.2e-97:
		tmp = y / (x * (1.0 + x))
	elif (x <= -8e-136) or not (x <= -6.6e-171):
		tmp = x / (y + (y * y))
	else:
		tmp = y / x
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -4.8e+156)
		tmp = Float64(Float64(y / x) / x);
	elseif (x <= -1.2e-97)
		tmp = Float64(y / Float64(x * Float64(1.0 + x)));
	elseif ((x <= -8e-136) || !(x <= -6.6e-171))
		tmp = Float64(x / Float64(y + Float64(y * y)));
	else
		tmp = Float64(y / x);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -4.8e+156)
		tmp = (y / x) / x;
	elseif (x <= -1.2e-97)
		tmp = y / (x * (1.0 + x));
	elseif ((x <= -8e-136) || ~((x <= -6.6e-171)))
		tmp = x / (y + (y * y));
	else
		tmp = y / x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -4.8e+156], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.2e-97], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -8e-136], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+156}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\

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

\mathbf{elif}\;x \leq -8 \cdot 10^{-136} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\

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


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

    1. Initial program 58.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]
    7. Applied egg-rr96.6%

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

    if -4.8000000000000002e156 < x < -1.2e-97

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

    if -1.2e-97 < x < -8.00000000000000001e-136 or -6.6000000000000004e-171 < x

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000001e-136 < x < -6.6000000000000004e-171

    1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+156}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-136} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \]

Alternative 9: 59.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+157}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -3.7e+157)
   (/ (/ y x) (+ y x))
   (if (<= x -1.2e-97)
     (/ y (* x (+ 1.0 x)))
     (if (or (<= x -4.6e-137) (not (<= x -6.6e-171)))
       (/ x (+ y (* y y)))
       (/ y x)))))
double code(double x, double y) {
	double tmp;
	if (x <= -3.7e+157) {
		tmp = (y / x) / (y + x);
	} else if (x <= -1.2e-97) {
		tmp = y / (x * (1.0 + x));
	} else if ((x <= -4.6e-137) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-3.7d+157)) then
        tmp = (y / x) / (y + x)
    else if (x <= (-1.2d-97)) then
        tmp = y / (x * (1.0d0 + x))
    else if ((x <= (-4.6d-137)) .or. (.not. (x <= (-6.6d-171)))) then
        tmp = x / (y + (y * y))
    else
        tmp = y / x
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -3.7e+157) {
		tmp = (y / x) / (y + x);
	} else if (x <= -1.2e-97) {
		tmp = y / (x * (1.0 + x));
	} else if ((x <= -4.6e-137) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -3.7e+157:
		tmp = (y / x) / (y + x)
	elif x <= -1.2e-97:
		tmp = y / (x * (1.0 + x))
	elif (x <= -4.6e-137) or not (x <= -6.6e-171):
		tmp = x / (y + (y * y))
	else:
		tmp = y / x
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -3.7e+157)
		tmp = Float64(Float64(y / x) / Float64(y + x));
	elseif (x <= -1.2e-97)
		tmp = Float64(y / Float64(x * Float64(1.0 + x)));
	elseif ((x <= -4.6e-137) || !(x <= -6.6e-171))
		tmp = Float64(x / Float64(y + Float64(y * y)));
	else
		tmp = Float64(y / x);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -3.7e+157)
		tmp = (y / x) / (y + x);
	elseif (x <= -1.2e-97)
		tmp = y / (x * (1.0 + x));
	elseif ((x <= -4.6e-137) || ~((x <= -6.6e-171)))
		tmp = x / (y + (y * y));
	else
		tmp = y / x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -3.7e+157], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-97], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -4.6e-137], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+157}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\

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

\mathbf{elif}\;x \leq -4.6 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\

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


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

    1. Initial program 58.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e157 < x < -1.2e-97

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

    if -1.2e-97 < x < -4.60000000000000016e-137 or -6.6000000000000004e-171 < x

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000016e-137 < x < -6.6000000000000004e-171

    1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+157}:\\ \;\;\;\;\frac{\frac{y}{x}}{y + x}\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \]

Alternative 10: 60.3% accurate, 1.1× speedup?

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

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

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

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

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


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

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.20000000000000002e-98 < x < -3.4999999999999998e-134

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999998e-134 < x < -6.6000000000000004e-171

    1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

    if -6.6000000000000004e-171 < x

    1. Initial program 65.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-*r/82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{-98}:\\ \;\;\;\;\frac{1}{\frac{x}{\frac{y}{1 + x}}}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-134}:\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \]

Alternative 11: 60.7% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-171}:\\
\;\;\;\;\frac{y}{x}\\

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


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

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0500000000000001e-97 < x < -1.85e-137

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.85e-137 < x < -3.2000000000000001e-171

    1. Initial program 67.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. times-frac76.6%

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

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

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

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

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

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

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

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

    if -3.2000000000000001e-171 < x

    1. Initial program 65.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-*r/82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{y}{1 + x}}{y + x}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-137}:\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-171}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \]

Alternative 12: 60.7% accurate, 1.1× speedup?

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

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

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

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

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


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

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{y}{1 + x}}{y + x}\right)\right)} \]
      2. expm1-udef55.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{y}{1 + x}}{y + x}\right)} - 1} \]
      3. associate-/l/55.5%

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\left(x + y\right) \cdot \left(x + 1\right)}\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def74.1%

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

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

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

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

    if -1.2e-97 < x < -4.60000000000000016e-137

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000016e-137 < x < -6.6000000000000004e-171

    1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

    if -6.6000000000000004e-171 < x

    1. Initial program 65.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-*r/82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{1 + x}\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{-137}:\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \]

Alternative 13: 65.2% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{y}{1 + x}}{y + x}\right)\right)} \]
      2. expm1-udef65.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{y}{1 + x}}{y + x}\right)} - 1} \]
      3. associate-/l/65.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y}{\color{blue}{\left(x + y\right)} \cdot \left(1 + x\right)}\right)} - 1 \]
      5. +-commutative65.2%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{\left(x + y\right) \cdot \left(x + 1\right)}\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def79.1%

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

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

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

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

    if -0.0749999999999999972 < x < -6.6000000000000004e-171

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{x + 1}} \]
    7. Taylor expanded in x around 0 72.4%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{y} \]

    if -6.6000000000000004e-171 < x

    1. Initial program 65.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-*r/82.5%

        \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      2. *-commutative82.5%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in71.8%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def82.5%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult82.5%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified82.5%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/66.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef56.0%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult56.0%

        \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in65.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+65.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative65.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times86.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
      8. *-commutative86.4%

        \[\leadsto \color{blue}{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. associate-/r*99.7%

        \[\leadsto \frac{y}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \]
      10. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
      11. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{\color{blue}{\left(y + 1\right) + x}} \cdot \frac{x}{x + y}}{x + y} \]
      12. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{\color{blue}{y + \left(1 + x\right)}} \cdot \frac{x}{x + y}}{x + y} \]
      13. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{\color{blue}{y + x}}}{x + y} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{\color{blue}{y + x}} \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{y + x}} \]
    6. Taylor expanded in x around 0 59.6%

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    7. Step-by-step derivation
      1. +-commutative59.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + 1}}}{y + x} \]
    8. Simplified59.6%

      \[\leadsto \frac{\color{blue}{\frac{x}{y + 1}}}{y + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.075:\\ \;\;\;\;\frac{\frac{y}{y + x}}{1 + x}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\ \;\;\;\;y \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \]

Alternative 14: 65.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.11:\\ \;\;\;\;\frac{\frac{1}{\frac{y + \left(1 + x\right)}{y}}}{y + x}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\ \;\;\;\;y \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -0.11)
   (/ (/ 1.0 (/ (+ y (+ 1.0 x)) y)) (+ y x))
   (if (<= x -6.6e-171)
     (* y (/ x (* (+ y x) (+ y x))))
     (/ (/ x (+ y 1.0)) (+ y x)))))
double code(double x, double y) {
	double tmp;
	if (x <= -0.11) {
		tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x);
	} else if (x <= -6.6e-171) {
		tmp = y * (x / ((y + x) * (y + x)));
	} else {
		tmp = (x / (y + 1.0)) / (y + x);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-0.11d0)) then
        tmp = (1.0d0 / ((y + (1.0d0 + x)) / y)) / (y + x)
    else if (x <= (-6.6d-171)) then
        tmp = y * (x / ((y + x) * (y + x)))
    else
        tmp = (x / (y + 1.0d0)) / (y + x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -0.11) {
		tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x);
	} else if (x <= -6.6e-171) {
		tmp = y * (x / ((y + x) * (y + x)));
	} else {
		tmp = (x / (y + 1.0)) / (y + x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -0.11:
		tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x)
	elif x <= -6.6e-171:
		tmp = y * (x / ((y + x) * (y + x)))
	else:
		tmp = (x / (y + 1.0)) / (y + x)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -0.11)
		tmp = Float64(Float64(1.0 / Float64(Float64(y + Float64(1.0 + x)) / y)) / Float64(y + x));
	elseif (x <= -6.6e-171)
		tmp = Float64(y * Float64(x / Float64(Float64(y + x) * Float64(y + x))));
	else
		tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -0.11)
		tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x);
	elseif (x <= -6.6e-171)
		tmp = y * (x / ((y + x) * (y + x)));
	else
		tmp = (x / (y + 1.0)) / (y + x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -0.11], N[(N[(1.0 / N[(N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-171], N[(y * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.11:\\
\;\;\;\;\frac{\frac{1}{\frac{y + \left(1 + x\right)}{y}}}{y + x}\\

\mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\
\;\;\;\;y \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -0.110000000000000001

    1. Initial program 63.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r/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. *-commutative82.8%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in34.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def82.8%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult82.8%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified82.8%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/63.3%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef34.6%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult34.6%

        \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in63.3%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+63.3%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative63.3%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times87.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
      8. *-commutative87.4%

        \[\leadsto \color{blue}{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. associate-/r*99.8%

        \[\leadsto \frac{y}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \]
      10. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
      11. +-commutative99.8%

        \[\leadsto \frac{\frac{y}{\color{blue}{\left(y + 1\right) + x}} \cdot \frac{x}{x + y}}{x + y} \]
      12. associate-+l+99.8%

        \[\leadsto \frac{\frac{y}{\color{blue}{y + \left(1 + x\right)}} \cdot \frac{x}{x + y}}{x + y} \]
      13. +-commutative99.8%

        \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{\color{blue}{y + x}}}{x + y} \]
      14. +-commutative99.8%

        \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{\color{blue}{y + x}} \]
    5. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{y + x}} \]
    6. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{y + \left(1 + x\right)}{y}}} \cdot \frac{x}{y + x}}{y + x} \]
      2. clear-num99.7%

        \[\leadsto \frac{\frac{1}{\frac{y + \left(1 + x\right)}{y}} \cdot \color{blue}{\frac{1}{\frac{y + x}{x}}}}{y + x} \]
      3. frac-times99.7%

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot 1}{\frac{y + \left(1 + x\right)}{y} \cdot \frac{y + x}{x}}}}{y + x} \]
      4. metadata-eval99.7%

        \[\leadsto \frac{\frac{\color{blue}{1}}{\frac{y + \left(1 + x\right)}{y} \cdot \frac{y + x}{x}}}{y + x} \]
    7. Applied egg-rr99.7%

      \[\leadsto \frac{\color{blue}{\frac{1}{\frac{y + \left(1 + x\right)}{y} \cdot \frac{y + x}{x}}}}{y + x} \]
    8. Step-by-step derivation
      1. *-commutative99.7%

        \[\leadsto \frac{\frac{1}{\color{blue}{\frac{y + x}{x} \cdot \frac{y + \left(1 + x\right)}{y}}}}{y + x} \]
      2. associate-/r*99.7%

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{\frac{y + x}{x}}}{\frac{y + \left(1 + x\right)}{y}}}}{y + x} \]
    9. Simplified99.7%

      \[\leadsto \frac{\color{blue}{\frac{\frac{1}{\frac{y + x}{x}}}{\frac{y + \left(1 + x\right)}{y}}}}{y + x} \]
    10. Taylor expanded in y around 0 75.6%

      \[\leadsto \frac{\frac{\color{blue}{1}}{\frac{y + \left(1 + x\right)}{y}}}{y + x} \]

    if -0.110000000000000001 < x < -6.6000000000000004e-171

    1. Initial program 87.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac92.9%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity92.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/92.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity92.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+92.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified92.9%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 72.7%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 + x}} \]
    5. Step-by-step derivation
      1. +-commutative72.7%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + 1}} \]
    6. Simplified72.7%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{x + 1}} \]
    7. Taylor expanded in x around 0 72.4%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{y} \]

    if -6.6000000000000004e-171 < x

    1. Initial program 65.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-*r/82.5%

        \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      2. *-commutative82.5%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in71.8%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def82.5%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult82.5%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified82.5%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/66.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
      2. fma-udef56.0%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
      3. cube-mult56.0%

        \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. distribute-rgt1-in65.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      5. associate-+r+65.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
      6. *-commutative65.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
      7. frac-times86.4%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
      8. *-commutative86.4%

        \[\leadsto \color{blue}{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \]
      9. associate-/r*99.7%

        \[\leadsto \frac{y}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \]
      10. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
      11. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{\color{blue}{\left(y + 1\right) + x}} \cdot \frac{x}{x + y}}{x + y} \]
      12. associate-+l+99.9%

        \[\leadsto \frac{\frac{y}{\color{blue}{y + \left(1 + x\right)}} \cdot \frac{x}{x + y}}{x + y} \]
      13. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{\color{blue}{y + x}}}{x + y} \]
      14. +-commutative99.9%

        \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{\color{blue}{y + x}} \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{y + x}} \]
    6. Taylor expanded in x around 0 59.6%

      \[\leadsto \frac{\color{blue}{\frac{x}{1 + y}}}{y + x} \]
    7. Step-by-step derivation
      1. +-commutative59.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{y + 1}}}{y + x} \]
    8. Simplified59.6%

      \[\leadsto \frac{\color{blue}{\frac{x}{y + 1}}}{y + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.11:\\ \;\;\;\;\frac{\frac{1}{\frac{y + \left(1 + x\right)}{y}}}{y + x}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\ \;\;\;\;y \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\ \end{array} \]

Alternative 15: 59.6% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-97}:\\ \;\;\;\;\frac{1}{\frac{x}{\frac{y}{1 + x}}}\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.05e-97)
   (/ 1.0 (/ x (/ y (+ 1.0 x))))
   (if (or (<= x -1.9e-137) (not (<= x -6.6e-171)))
     (/ x (+ y (* y y)))
     (/ y x))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.05e-97) {
		tmp = 1.0 / (x / (y / (1.0 + x)));
	} else if ((x <= -1.9e-137) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= (-1.05d-97)) then
        tmp = 1.0d0 / (x / (y / (1.0d0 + x)))
    else if ((x <= (-1.9d-137)) .or. (.not. (x <= (-6.6d-171)))) then
        tmp = x / (y + (y * y))
    else
        tmp = y / x
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.05e-97) {
		tmp = 1.0 / (x / (y / (1.0 + x)));
	} else if ((x <= -1.9e-137) || !(x <= -6.6e-171)) {
		tmp = x / (y + (y * y));
	} else {
		tmp = y / x;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.05e-97:
		tmp = 1.0 / (x / (y / (1.0 + x)))
	elif (x <= -1.9e-137) or not (x <= -6.6e-171):
		tmp = x / (y + (y * y))
	else:
		tmp = y / x
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.05e-97)
		tmp = Float64(1.0 / Float64(x / Float64(y / Float64(1.0 + x))));
	elseif ((x <= -1.9e-137) || !(x <= -6.6e-171))
		tmp = Float64(x / Float64(y + Float64(y * y)));
	else
		tmp = Float64(y / x);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.05e-97)
		tmp = 1.0 / (x / (y / (1.0 + x)));
	elseif ((x <= -1.9e-137) || ~((x <= -6.6e-171)))
		tmp = x / (y + (y * y));
	else
		tmp = y / x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.05e-97], N[(1.0 / N[(x / N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.9e-137], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-97}:\\
\;\;\;\;\frac{1}{\frac{x}{\frac{y}{1 + x}}}\\

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.0500000000000001e-97

    1. Initial program 68.2%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac89.5%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity89.5%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/89.5%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity89.5%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+89.5%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified89.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 69.9%

      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
    5. Step-by-step derivation
      1. clear-num69.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(1 + x\right) \cdot x}{y}}} \]
      2. inv-pow69.9%

        \[\leadsto \color{blue}{{\left(\frac{\left(1 + x\right) \cdot x}{y}\right)}^{-1}} \]
      3. *-commutative69.9%

        \[\leadsto {\left(\frac{\color{blue}{x \cdot \left(1 + x\right)}}{y}\right)}^{-1} \]
    6. Applied egg-rr69.9%

      \[\leadsto \color{blue}{{\left(\frac{x \cdot \left(1 + x\right)}{y}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-169.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot \left(1 + x\right)}{y}}} \]
      2. associate-/l*69.7%

        \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{y}{1 + x}}}} \]
    8. Simplified69.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{y}{1 + x}}}} \]

    if -1.0500000000000001e-97 < x < -1.89999999999999999e-137 or -6.6000000000000004e-171 < x

    1. Initial program 67.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. times-frac87.1%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity87.1%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/87.1%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity87.1%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+87.1%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.1%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around 0 61.6%

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(1 + y\right)}} \]
    5. Step-by-step derivation
      1. distribute-rgt-in61.6%

        \[\leadsto \frac{x}{\color{blue}{1 \cdot y + y \cdot y}} \]
      2. *-lft-identity61.6%

        \[\leadsto \frac{x}{\color{blue}{y} + y \cdot y} \]
    6. Simplified61.6%

      \[\leadsto \color{blue}{\frac{x}{y + y \cdot y}} \]

    if -1.89999999999999999e-137 < x < -6.6000000000000004e-171

    1. Initial program 67.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. times-frac76.6%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity76.6%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/76.6%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity76.6%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+76.6%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified76.6%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 46.0%

      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
    5. Taylor expanded in x around 0 46.0%

      \[\leadsto \frac{y}{\color{blue}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-97}:\\ \;\;\;\;\frac{1}{\frac{x}{\frac{y}{1 + x}}}\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\ \;\;\;\;\frac{x}{y + y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \]

Alternative 16: 55.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{x \cdot x}\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{-129}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-129}:\\ \;\;\;\;\frac{1}{\frac{x}{y}}\\ \mathbf{elif}\;y \leq 120:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ y (* x x))))
   (if (<= y -1.6e-129)
     t_0
     (if (<= y 1.25e-129)
       (/ 1.0 (/ x y))
       (if (<= y 120.0) t_0 (/ (/ x y) y))))))
double code(double x, double y) {
	double t_0 = y / (x * x);
	double tmp;
	if (y <= -1.6e-129) {
		tmp = t_0;
	} else if (y <= 1.25e-129) {
		tmp = 1.0 / (x / y);
	} else if (y <= 120.0) {
		tmp = t_0;
	} else {
		tmp = (x / y) / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = y / (x * x)
    if (y <= (-1.6d-129)) then
        tmp = t_0
    else if (y <= 1.25d-129) then
        tmp = 1.0d0 / (x / y)
    else if (y <= 120.0d0) then
        tmp = t_0
    else
        tmp = (x / y) / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = y / (x * x);
	double tmp;
	if (y <= -1.6e-129) {
		tmp = t_0;
	} else if (y <= 1.25e-129) {
		tmp = 1.0 / (x / y);
	} else if (y <= 120.0) {
		tmp = t_0;
	} else {
		tmp = (x / y) / y;
	}
	return tmp;
}
def code(x, y):
	t_0 = y / (x * x)
	tmp = 0
	if y <= -1.6e-129:
		tmp = t_0
	elif y <= 1.25e-129:
		tmp = 1.0 / (x / y)
	elif y <= 120.0:
		tmp = t_0
	else:
		tmp = (x / y) / y
	return tmp
function code(x, y)
	t_0 = Float64(y / Float64(x * x))
	tmp = 0.0
	if (y <= -1.6e-129)
		tmp = t_0;
	elseif (y <= 1.25e-129)
		tmp = Float64(1.0 / Float64(x / y));
	elseif (y <= 120.0)
		tmp = t_0;
	else
		tmp = Float64(Float64(x / y) / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = y / (x * x);
	tmp = 0.0;
	if (y <= -1.6e-129)
		tmp = t_0;
	elseif (y <= 1.25e-129)
		tmp = 1.0 / (x / y);
	elseif (y <= 120.0)
		tmp = t_0;
	else
		tmp = (x / y) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e-129], t$95$0, If[LessEqual[y, 1.25e-129], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 120.0], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{-129}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-129}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\

\mathbf{elif}\;y \leq 120:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.6000000000000001e-129 or 1.25000000000000007e-129 < y < 120

    1. Initial program 78.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r/91.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. *-commutative91.4%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in59.6%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def91.4%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult91.4%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified91.4%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in x around inf 36.5%

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. unpow236.5%

        \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
    6. Simplified36.5%

      \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]

    if -1.6000000000000001e-129 < y < 1.25000000000000007e-129

    1. Initial program 58.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. times-frac74.8%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified74.8%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 83.1%

      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
    5. Step-by-step derivation
      1. clear-num82.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(1 + x\right) \cdot x}{y}}} \]
      2. inv-pow82.9%

        \[\leadsto \color{blue}{{\left(\frac{\left(1 + x\right) \cdot x}{y}\right)}^{-1}} \]
      3. *-commutative82.9%

        \[\leadsto {\left(\frac{\color{blue}{x \cdot \left(1 + x\right)}}{y}\right)}^{-1} \]
    6. Applied egg-rr82.9%

      \[\leadsto \color{blue}{{\left(\frac{x \cdot \left(1 + x\right)}{y}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-182.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot \left(1 + x\right)}{y}}} \]
      2. associate-/l*82.9%

        \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{y}{1 + x}}}} \]
    8. Simplified82.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{y}{1 + x}}}} \]
    9. Taylor expanded in x around 0 76.3%

      \[\leadsto \frac{1}{\frac{x}{\color{blue}{y}}} \]

    if 120 < y

    1. Initial program 58.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r/80.9%

        \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      2. *-commutative80.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in70.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def80.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult81.0%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified81.0%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 68.1%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow268.1%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified68.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
    7. Step-by-step derivation
      1. *-un-lft-identity68.1%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot y} \]
      2. times-frac70.7%

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y}} \]
    8. Applied egg-rr70.7%

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y}} \]
    9. Step-by-step derivation
      1. associate-*l/70.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y}}{y}} \]
      2. *-lft-identity70.8%

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{y} \]
    10. Simplified70.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{-129}:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-129}:\\ \;\;\;\;\frac{1}{\frac{x}{y}}\\ \mathbf{elif}\;y \leq 120:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]

Alternative 17: 55.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{y}{x}}{x}\\ \mathbf{if}\;y \leq -2.45 \cdot 10^{-127}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-130}:\\ \;\;\;\;\frac{1}{\frac{x}{y}}\\ \mathbf{elif}\;y \leq 120:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (/ y x) x)))
   (if (<= y -2.45e-127)
     t_0
     (if (<= y 7e-130) (/ 1.0 (/ x y)) (if (<= y 120.0) t_0 (/ (/ x y) y))))))
double code(double x, double y) {
	double t_0 = (y / x) / x;
	double tmp;
	if (y <= -2.45e-127) {
		tmp = t_0;
	} else if (y <= 7e-130) {
		tmp = 1.0 / (x / y);
	} else if (y <= 120.0) {
		tmp = t_0;
	} else {
		tmp = (x / y) / y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (y / x) / x
    if (y <= (-2.45d-127)) then
        tmp = t_0
    else if (y <= 7d-130) then
        tmp = 1.0d0 / (x / y)
    else if (y <= 120.0d0) then
        tmp = t_0
    else
        tmp = (x / y) / y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = (y / x) / x;
	double tmp;
	if (y <= -2.45e-127) {
		tmp = t_0;
	} else if (y <= 7e-130) {
		tmp = 1.0 / (x / y);
	} else if (y <= 120.0) {
		tmp = t_0;
	} else {
		tmp = (x / y) / y;
	}
	return tmp;
}
def code(x, y):
	t_0 = (y / x) / x
	tmp = 0
	if y <= -2.45e-127:
		tmp = t_0
	elif y <= 7e-130:
		tmp = 1.0 / (x / y)
	elif y <= 120.0:
		tmp = t_0
	else:
		tmp = (x / y) / y
	return tmp
function code(x, y)
	t_0 = Float64(Float64(y / x) / x)
	tmp = 0.0
	if (y <= -2.45e-127)
		tmp = t_0;
	elseif (y <= 7e-130)
		tmp = Float64(1.0 / Float64(x / y));
	elseif (y <= 120.0)
		tmp = t_0;
	else
		tmp = Float64(Float64(x / y) / y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (y / x) / x;
	tmp = 0.0;
	if (y <= -2.45e-127)
		tmp = t_0;
	elseif (y <= 7e-130)
		tmp = 1.0 / (x / y);
	elseif (y <= 120.0)
		tmp = t_0;
	else
		tmp = (x / y) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[y, -2.45e-127], t$95$0, If[LessEqual[y, 7e-130], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 120.0], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x}\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{-127}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 7 \cdot 10^{-130}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\

\mathbf{elif}\;y \leq 120:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.45e-127 or 6.9999999999999998e-130 < y < 120

    1. Initial program 78.8%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac95.2%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity95.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/95.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity95.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+95.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified95.2%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in x around inf 50.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{x}} \]
    5. Taylor expanded in x around inf 37.1%

      \[\leadsto \color{blue}{\frac{1}{x}} \cdot \frac{y}{x} \]
    6. Step-by-step derivation
      1. associate-*l/37.1%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{y}{x}}{x}} \]
      2. *-un-lft-identity37.1%

        \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{x} \]
    7. Applied egg-rr37.1%

      \[\leadsto \color{blue}{\frac{\frac{y}{x}}{x}} \]

    if -2.45e-127 < y < 6.9999999999999998e-130

    1. Initial program 58.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. times-frac74.8%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+74.8%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified74.8%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 83.1%

      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
    5. Step-by-step derivation
      1. clear-num82.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(1 + x\right) \cdot x}{y}}} \]
      2. inv-pow82.9%

        \[\leadsto \color{blue}{{\left(\frac{\left(1 + x\right) \cdot x}{y}\right)}^{-1}} \]
      3. *-commutative82.9%

        \[\leadsto {\left(\frac{\color{blue}{x \cdot \left(1 + x\right)}}{y}\right)}^{-1} \]
    6. Applied egg-rr82.9%

      \[\leadsto \color{blue}{{\left(\frac{x \cdot \left(1 + x\right)}{y}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-182.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot \left(1 + x\right)}{y}}} \]
      2. associate-/l*82.9%

        \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{y}{1 + x}}}} \]
    8. Simplified82.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{y}{1 + x}}}} \]
    9. Taylor expanded in x around 0 76.3%

      \[\leadsto \frac{1}{\frac{x}{\color{blue}{y}}} \]

    if 120 < y

    1. Initial program 58.0%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r/80.9%

        \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      2. *-commutative80.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in70.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def80.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult81.0%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified81.0%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 68.1%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow268.1%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified68.1%

      \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
    7. Step-by-step derivation
      1. *-un-lft-identity68.1%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot y} \]
      2. times-frac70.7%

        \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y}} \]
    8. Applied egg-rr70.7%

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{y}} \]
    9. Step-by-step derivation
      1. associate-*l/70.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y}}{y}} \]
      2. *-lft-identity70.8%

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{y} \]
    10. Simplified70.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{-127}:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-130}:\\ \;\;\;\;\frac{1}{\frac{x}{y}}\\ \mathbf{elif}\;y \leq 120:\\ \;\;\;\;\frac{\frac{y}{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]

Alternative 18: 45.7% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-217}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x -1.0)
   (/ y (* x x))
   (if (<= x -3.3e-217) (- (/ y x) y) (/ x (* y y)))))
double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = y / (x * x);
	} else if (x <= -3.3e-217) {
		tmp = (y / 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 (x <= (-1.0d0)) then
        tmp = y / (x * x)
    else if (x <= (-3.3d-217)) then
        tmp = (y / x) - y
    else
        tmp = x / (y * y)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= -1.0) {
		tmp = y / (x * x);
	} else if (x <= -3.3e-217) {
		tmp = (y / x) - y;
	} else {
		tmp = x / (y * y);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= -1.0:
		tmp = y / (x * x)
	elif x <= -3.3e-217:
		tmp = (y / x) - y
	else:
		tmp = x / (y * y)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(y / Float64(x * x));
	elseif (x <= -3.3e-217)
		tmp = Float64(Float64(y / x) - y);
	else
		tmp = Float64(x / Float64(y * y));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= -1.0)
		tmp = y / (x * x);
	elseif (x <= -3.3e-217)
		tmp = (y / x) - y;
	else
		tmp = x / (y * y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, -1.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.3e-217], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\

\mathbf{elif}\;x \leq -3.3 \cdot 10^{-217}:\\
\;\;\;\;\frac{y}{x} - y\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1

    1. Initial program 63.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r/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. *-commutative82.8%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in34.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def82.8%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult82.8%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified82.8%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in x around inf 70.2%

      \[\leadsto \color{blue}{\frac{y}{{x}^{2}}} \]
    5. Step-by-step derivation
      1. unpow270.2%

        \[\leadsto \frac{y}{\color{blue}{x \cdot x}} \]
    6. Simplified70.2%

      \[\leadsto \color{blue}{\frac{y}{x \cdot x}} \]

    if -1 < x < -3.29999999999999993e-217

    1. Initial program 78.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. times-frac84.9%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity84.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/84.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity84.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+84.9%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified84.9%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 32.5%

      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
    5. Taylor expanded in x around 0 32.5%

      \[\leadsto \color{blue}{\frac{y}{x} + -1 \cdot y} \]
    6. Step-by-step derivation
      1. neg-mul-132.5%

        \[\leadsto \frac{y}{x} + \color{blue}{\left(-y\right)} \]
      2. unsub-neg32.5%

        \[\leadsto \color{blue}{\frac{y}{x} - y} \]
    7. Simplified32.5%

      \[\leadsto \color{blue}{\frac{y}{x} - y} \]

    if -3.29999999999999993e-217 < x

    1. Initial program 66.3%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r/83.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. *-commutative83.9%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in73.5%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def84.0%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult84.0%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified84.0%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 42.3%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow242.3%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified42.3%

      \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification47.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-217}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 19: 44.1% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 8.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{1}{\frac{x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y 8.6e-18) (/ 1.0 (/ x y)) (/ x (* y y))))
double code(double x, double y) {
	double tmp;
	if (y <= 8.6e-18) {
		tmp = 1.0 / (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 <= 8.6d-18) then
        tmp = 1.0d0 / (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 <= 8.6e-18) {
		tmp = 1.0 / (x / y);
	} else {
		tmp = x / (y * y);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 8.6e-18:
		tmp = 1.0 / (x / y)
	else:
		tmp = x / (y * y)
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 8.6e-18)
		tmp = Float64(1.0 / 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 <= 8.6e-18)
		tmp = 1.0 / (x / y);
	else
		tmp = x / (y * y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 8.6e-18], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 8.6000000000000005e-18

    1. Initial program 70.1%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. times-frac87.2%

        \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
      2. /-rgt-identity87.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
      3. associate-/l/87.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
      4. *-lft-identity87.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
      5. associate-+l+87.2%

        \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
    3. Simplified87.2%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    4. Taylor expanded in y around 0 56.8%

      \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
    5. Step-by-step derivation
      1. clear-num56.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(1 + x\right) \cdot x}{y}}} \]
      2. inv-pow56.7%

        \[\leadsto \color{blue}{{\left(\frac{\left(1 + x\right) \cdot x}{y}\right)}^{-1}} \]
      3. *-commutative56.7%

        \[\leadsto {\left(\frac{\color{blue}{x \cdot \left(1 + x\right)}}{y}\right)}^{-1} \]
    6. Applied egg-rr56.7%

      \[\leadsto \color{blue}{{\left(\frac{x \cdot \left(1 + x\right)}{y}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-156.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot \left(1 + x\right)}{y}}} \]
      2. associate-/l*57.1%

        \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{y}{1 + x}}}} \]
    8. Simplified57.1%

      \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{y}{1 + x}}}} \]
    9. Taylor expanded in x around 0 37.3%

      \[\leadsto \frac{1}{\frac{x}{\color{blue}{y}}} \]

    if 8.6000000000000005e-18 < y

    1. Initial program 61.7%

      \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r/82.6%

        \[\leadsto \color{blue}{x \cdot \frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}} \]
      2. *-commutative82.6%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      3. distribute-rgt1-in69.1%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
      4. fma-def82.6%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
      5. cube-unmult82.6%

        \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
    3. Simplified82.6%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    4. Taylor expanded in y around inf 62.9%

      \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. unpow262.9%

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    6. Simplified62.9%

      \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 8.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{1}{\frac{x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]

Alternative 20: 27.0% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \frac{1}{\frac{x}{y}} \end{array} \]
(FPCore (x y) :precision binary64 (/ 1.0 (/ x y)))
double code(double x, double y) {
	return 1.0 / (x / y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 / (x / y)
end function
public static double code(double x, double y) {
	return 1.0 / (x / y);
}
def code(x, y):
	return 1.0 / (x / y)
function code(x, y)
	return Float64(1.0 / Float64(x / y))
end
function tmp = code(x, y)
	tmp = 1.0 / (x / y);
end
code[x_, y_] := N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{\frac{x}{y}}
\end{array}
Derivation
  1. Initial program 67.8%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac87.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. /-rgt-identity87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
    3. associate-/l/87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
    4. *-lft-identity87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
    5. associate-+l+87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified87.5%

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
  4. Taylor expanded in y around 0 49.3%

    \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
  5. Step-by-step derivation
    1. clear-num49.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(1 + x\right) \cdot x}{y}}} \]
    2. inv-pow49.2%

      \[\leadsto \color{blue}{{\left(\frac{\left(1 + x\right) \cdot x}{y}\right)}^{-1}} \]
    3. *-commutative49.2%

      \[\leadsto {\left(\frac{\color{blue}{x \cdot \left(1 + x\right)}}{y}\right)}^{-1} \]
  6. Applied egg-rr49.2%

    \[\leadsto \color{blue}{{\left(\frac{x \cdot \left(1 + x\right)}{y}\right)}^{-1}} \]
  7. Step-by-step derivation
    1. unpow-149.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{x \cdot \left(1 + x\right)}{y}}} \]
    2. associate-/l*49.3%

      \[\leadsto \frac{1}{\color{blue}{\frac{x}{\frac{y}{1 + x}}}} \]
  8. Simplified49.3%

    \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{y}{1 + x}}}} \]
  9. Taylor expanded in x around 0 28.0%

    \[\leadsto \frac{1}{\frac{x}{\color{blue}{y}}} \]
  10. Final simplification28.0%

    \[\leadsto \frac{1}{\frac{x}{y}} \]

Alternative 21: 4.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{1}{y} \end{array} \]
(FPCore (x y) :precision binary64 (/ 1.0 y))
double code(double x, double y) {
	return 1.0 / y;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 / y
end function
public static double code(double x, double y) {
	return 1.0 / y;
}
def code(x, y):
	return 1.0 / y
function code(x, y)
	return Float64(1.0 / y)
end
function tmp = code(x, y)
	tmp = 1.0 / y;
end
code[x_, y_] := N[(1.0 / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{y}
\end{array}
Derivation
  1. Initial program 67.8%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac87.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. /-rgt-identity87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
    3. associate-/l/87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
    4. *-lft-identity87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
    5. associate-+l+87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified87.5%

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
  4. Taylor expanded in x around inf 44.2%

    \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{x}} \]
  5. Taylor expanded in x around 0 4.0%

    \[\leadsto \color{blue}{\frac{1}{y}} \]
  6. Final simplification4.0%

    \[\leadsto \frac{1}{y} \]

Alternative 22: 26.5% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{y}{x} \end{array} \]
(FPCore (x y) :precision binary64 (/ y x))
double code(double x, double y) {
	return y / x;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = y / x
end function
public static double code(double x, double y) {
	return y / x;
}
def code(x, y):
	return y / x
function code(x, y)
	return Float64(y / x)
end
function tmp = code(x, y)
	tmp = y / x;
end
code[x_, y_] := N[(y / x), $MachinePrecision]
\begin{array}{l}

\\
\frac{y}{x}
\end{array}
Derivation
  1. Initial program 67.8%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. times-frac87.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}} \]
    2. /-rgt-identity87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{\frac{y}{\left(x + y\right) + 1}}{1}} \]
    3. associate-/l/87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \color{blue}{\frac{y}{1 \cdot \left(\left(x + y\right) + 1\right)}} \]
    4. *-lft-identity87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{\left(x + y\right) + 1}} \]
    5. associate-+l+87.5%

      \[\leadsto \frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Simplified87.5%

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
  4. Taylor expanded in y around 0 49.3%

    \[\leadsto \color{blue}{\frac{y}{\left(1 + x\right) \cdot x}} \]
  5. Taylor expanded in x around 0 27.8%

    \[\leadsto \frac{y}{\color{blue}{x}} \]
  6. Final simplification27.8%

    \[\leadsto \frac{y}{x} \]

Alternative 23: 3.5% accurate, 17.0× speedup?

\[\begin{array}{l} \\ 1 \end{array} \]
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
	return 1.0;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0
end function
public static double code(double x, double y) {
	return 1.0;
}
def code(x, y):
	return 1.0
function code(x, y)
	return 1.0
end
function tmp = code(x, y)
	tmp = 1.0;
end
code[x_, y_] := 1.0
\begin{array}{l}

\\
1
\end{array}
Derivation
  1. Initial program 67.8%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Step-by-step derivation
    1. associate-*r/83.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. *-commutative83.5%

      \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    3. distribute-rgt1-in63.2%

      \[\leadsto x \cdot \frac{y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    4. fma-def83.5%

      \[\leadsto x \cdot \frac{y}{\color{blue}{\mathsf{fma}\left(x + y, x + y, \left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)\right)}} \]
    5. cube-unmult83.5%

      \[\leadsto x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, \color{blue}{{\left(x + y\right)}^{3}}\right)} \]
  3. Simplified83.5%

    \[\leadsto \color{blue}{x \cdot \frac{y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
  4. Step-by-step derivation
    1. associate-*r/67.9%

      \[\leadsto \color{blue}{\frac{x \cdot y}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}} \]
    2. fma-udef52.9%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + y\right) \cdot \left(x + y\right) + {\left(x + y\right)}^{3}}} \]
    3. cube-mult52.9%

      \[\leadsto \frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right) + \color{blue}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    4. distribute-rgt1-in67.8%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}} \]
    5. associate-+r+67.8%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x + \left(y + 1\right)\right)} \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)} \]
    6. *-commutative67.8%

      \[\leadsto \frac{x \cdot y}{\color{blue}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + \left(y + 1\right)\right)}} \]
    7. frac-times87.5%

      \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{x + \left(y + 1\right)}} \]
    8. *-commutative87.5%

      \[\leadsto \color{blue}{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}} \]
    9. associate-/r*99.7%

      \[\leadsto \frac{y}{x + \left(y + 1\right)} \cdot \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \]
    10. associate-*r/99.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{x + y}}{x + y}} \]
    11. +-commutative99.8%

      \[\leadsto \frac{\frac{y}{\color{blue}{\left(y + 1\right) + x}} \cdot \frac{x}{x + y}}{x + y} \]
    12. associate-+l+99.8%

      \[\leadsto \frac{\frac{y}{\color{blue}{y + \left(1 + x\right)}} \cdot \frac{x}{x + y}}{x + y} \]
    13. +-commutative99.8%

      \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{\color{blue}{y + x}}}{x + y} \]
    14. +-commutative99.8%

      \[\leadsto \frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{\color{blue}{y + x}} \]
  5. Applied egg-rr99.8%

    \[\leadsto \color{blue}{\frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{y + x}} \]
  6. Taylor expanded in y around 0 50.2%

    \[\leadsto \frac{\color{blue}{\frac{y}{1 + x}}}{y + x} \]
  7. Taylor expanded in x around 0 3.5%

    \[\leadsto \color{blue}{1} \]
  8. Final simplification3.5%

    \[\leadsto 1 \]

Developer target: 99.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}} \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y):
	return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y)
	return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x))))
end
function tmp = code(x, y)
	tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}

Reproduce

?
herbie shell --seed 2023208 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))

  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))