\[ \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{1}{\frac{y + x}{x}} \cdot \frac{\frac{y}{y + \left(1 + x\right)}}{y + x}
\]
(FPCore (x y)
:precision binary64
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
↓
(FPCore (x y)
:precision binary64
(* (/ 1.0 (/ (+ y x) x)) (/ (/ y (+ y (+ 1.0 x))) (+ y x))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
↓
double code(double x, double y) {
return (1.0 / ((y + x) / x)) * ((y / (y + (1.0 + x))) / (y + x));
}
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 = (1.0d0 / ((y + x) / x)) * ((y / (y + (1.0d0 + x))) / (y + x))
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 (1.0 / ((y + x) / x)) * ((y / (y + (1.0 + x))) / (y + x));
}
def code(x, y):
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
↓
def code(x, y):
return (1.0 / ((y + x) / x)) * ((y / (y + (1.0 + x))) / (y + x))
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(1.0 / Float64(Float64(y + x) / x)) * Float64(Float64(y / Float64(y + Float64(1.0 + x))) / Float64(y + x)))
end
function tmp = code(x, y)
tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
end
↓
function tmp = code(x, y)
tmp = (1.0 / ((y + x) / x)) * ((y / (y + (1.0 + x))) / (y + x));
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[(1.0 / N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $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{1}{\frac{y + x}{x}} \cdot \frac{\frac{y}{y + \left(1 + x\right)}}{y + x}
Alternatives
| Alternative 1 |
|---|
| Error | 8.7 |
|---|
| Cost | 1360 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(y + \left(1 + x\right)\right) \cdot \left(x + y \cdot 2\right)}\\
t_1 := x + \left(1 + y\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+137}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{t_1}\\
\mathbf{elif}\;x \leq -2.15 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{-159}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_1}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 5.4 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_0 := x + \left(1 + y\right)\\
\mathbf{if}\;x \leq -1.12 \cdot 10^{+84}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{t_0}\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-162}:\\
\;\;\;\;\frac{x}{\frac{y + \left(1 + x\right)}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 3.2 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_0 := x + \left(1 + y\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+137}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{t_0}\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{-307}:\\
\;\;\;\;\frac{y}{\left(y + \left(1 + x\right)\right) \cdot \left(\frac{y + x}{x} \cdot \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{t_0}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 16.0 |
|---|
| Cost | 1108 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -116:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.95 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.1 |
|---|
| Cost | 1088 |
|---|
\[\frac{\frac{x \cdot \frac{y}{y + x}}{y + x}}{x + \left(1 + y\right)}
\]
| Alternative 6 |
|---|
| Error | 18.2 |
|---|
| Cost | 980 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;x \leq -116:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-115}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 17.2 |
|---|
| Cost | 980 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -116:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.95 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 10^{-156}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 16.0 |
|---|
| Cost | 980 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -116:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-32}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-115}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 13.5 |
|---|
| Cost | 977 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -116:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-115} \lor \neg \left(x \leq -4.1 \cdot 10^{-150}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 12.1 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-115}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(1 + y\right)}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 10.4 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+139}:\\
\;\;\;\;\frac{x}{\frac{y + \left(1 + x\right)}{\frac{1}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{1}{y}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 10.4 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.65 \cdot 10^{-96}:\\
\;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+138}:\\
\;\;\;\;\frac{x}{\frac{y + \left(1 + x\right)}{\frac{1}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{1 + \left(y + x\right)}}{\frac{y}{x}}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 10.3 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+138}:\\
\;\;\;\;\frac{x}{\frac{y + \left(1 + x\right)}{\frac{1}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{x + \left(1 + y\right)}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 13.0 |
|---|
| Cost | 845 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{y}{x}}{1 + x}\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-115} \lor \neg \left(x \leq -4.1 \cdot 10^{-150}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 22.6 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.1 \cdot 10^{-134}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 35.7 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.75 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 61.4 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{y}
\]
| Alternative 18 |
|---|
| Error | 47.3 |
|---|
| Cost | 192 |
|---|
\[\frac{x}{y}
\]