\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \end{array} \]
\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\]
↓
\[\frac{\frac{\frac{x}{1 + \frac{x}{y}}}{y + \left(x + 1\right)}}{x + y}
\]
(FPCore (x y)
:precision binary64
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
↓
(FPCore (x y)
:precision binary64
(/ (/ (/ x (+ 1.0 (/ x y))) (+ y (+ x 1.0))) (+ x y)))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
↓
double code(double x, double y) {
return ((x / (1.0 + (x / y))) / (y + (x + 1.0))) / (x + y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / (1.0d0 + (x / y))) / (y + (x + 1.0d0))) / (x + y)
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
↓
public static double code(double x, double y) {
return ((x / (1.0 + (x / y))) / (y + (x + 1.0))) / (x + y);
}
def code(x, y):
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
↓
def code(x, y):
return ((x / (1.0 + (x / y))) / (y + (x + 1.0))) / (x + y)
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 code(x, y)
return Float64(Float64(Float64(x / Float64(1.0 + Float64(x / y))) / Float64(y + Float64(x + 1.0))) / Float64(x + y))
end
function tmp = code(x, y)
tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
end
↓
function tmp = code(x, y)
tmp = ((x / (1.0 + (x / y))) / (y + (x + 1.0))) / (x + y);
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]
↓
code[x_, y_] := N[(N[(N[(x / N[(1.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
↓
\frac{\frac{\frac{x}{1 + \frac{x}{y}}}{y + \left(x + 1\right)}}{x + y}
Alternatives
| Alternative 1 |
|---|
| Error | 3.3 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_0 := y + \left(x + 1\right)\\
\mathbf{if}\;y \leq -2.373773625943706 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{y}{t_0}}{x + y}\\
\mathbf{elif}\;y \leq 3.43047155478845 \cdot 10^{+149}:\\
\;\;\;\;\frac{x}{\left(1 + \frac{x}{y}\right) \cdot \left(t_0 \cdot \left(x + y\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t_0}}{x + y}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 11.4 |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{y + \left(x + 1\right)}}{x + y}\\
\mathbf{if}\;x \leq -9.820027651546739 \cdot 10^{-14}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -5.75206337496721 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{elif}\;x \leq -5.370890089858983 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 9.8 |
|---|
| Cost | 1092 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.370890089858983 \cdot 10^{-106}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + \left(1 + y\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 11.5 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x + 1}}{x + y}\\
\mathbf{if}\;x \leq -9.820027651546739 \cdot 10^{-14}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -5.75206337496721 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{elif}\;x \leq -5.370890089858983 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 11.2 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x + 1}}{x}\\
\mathbf{if}\;x \leq -3.554993965577662 \cdot 10^{-31}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -5.75206337496721 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{elif}\;x \leq -5.370890089858983 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 15.6 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.2955409948581024 \cdot 10^{-213}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;y \leq 8.988830497055325 \cdot 10^{-157}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.001253329071841231:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 12.4 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.0002873400466925893:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq 1.172152902457756 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 12.4 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.0002873400466925893:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq 1.172152902457756 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 12.3 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.0002873400466925893:\\
\;\;\;\;\frac{\frac{y}{x}}{x + y}\\
\mathbf{elif}\;x \leq 1.172152902457756 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 20.7 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -51.2898923662645:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -5.370890089858983 \cdot 10^{-106}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 12.3 |
|---|
| Cost | 580 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.0002873400466925893:\\
\;\;\;\;\frac{\frac{y}{x}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 20.9 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -51.2898923662645:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -5.370890089858983 \cdot 10^{-106}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 35.9 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 8.988830497055325 \cdot 10^{-157}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 47.1 |
|---|
| Cost | 192 |
|---|
\[\frac{x}{y}
\]
| Alternative 15 |
|---|
| Error | 61.6 |
|---|
| Cost | 128 |
|---|
\[-y
\]
| Alternative 16 |
|---|
| Error | 61.8 |
|---|
| Cost | 64 |
|---|
\[1
\]