\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\]
↓
\[\frac{x \cdot \frac{\frac{y}{x + y}}{x + \left(y + 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 (/ (/ y (+ x y)) (+ x (+ y 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 * ((y / (x + y)) / (x + (y + 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 * ((y / (x + y)) / (x + (y + 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 * ((y / (x + y)) / (x + (y + 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 * ((y / (x + y)) / (x + (y + 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(x * Float64(Float64(y / Float64(x + y)) / Float64(x + Float64(y + 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 * ((y / (x + y)) / (x + (y + 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[(x * N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $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{x \cdot \frac{\frac{y}{x + y}}{x + \left(y + 1\right)}}{x + y}
Alternatives
| Alternative 1 |
|---|
| Error | 18.9 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+141}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{y}{x}}{t_0}}{x + y}\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-168}:\\
\;\;\;\;\frac{x}{\frac{y + \left(x + 1\right)}{\frac{y}{\left(x + y\right) \cdot \left(x + y\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 22.1 |
|---|
| Cost | 1092 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+158}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{y}{x}}{t_0}}{x + y}\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-153}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 22.2 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+158}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + y}\\
\mathbf{elif}\;x \leq -8.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 22.1 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+157}:\\
\;\;\;\;\frac{\frac{y}{x + y}}{t_0}\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-153}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 29.3 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-136}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-206}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{-138}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 25.4 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.06 \cdot 10^{-125}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 25.4 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-124}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 1.82 \cdot 10^{+71}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 25.1 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-124}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 25.0 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.66 \cdot 10^{-124}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 24.9 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.76 \cdot 10^{-84}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+74}:\\
\;\;\;\;\frac{x}{y + y \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 30.4 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-141}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.76:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 29.9 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;y \leq 1.46 \cdot 10^{-108}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.76:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 25.1 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 8.2 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 25.1 |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 8.2 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 25.1 |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 5.2 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{x + y}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 25.0 |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 8.2 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{x + y}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 35.5 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 3.6 \cdot 10^{-100}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 42.3 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-147}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 61.3 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{y}
\]
| Alternative 20 |
|---|
| Error | 46.7 |
|---|
| Cost | 192 |
|---|
\[\frac{x}{y}
\]