\[\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{x \cdot \frac{y}{y + x}}{y + x}}{x + \left(y + 1\right)}
\]
(FPCore (x y)
:precision binary64
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
↓
(FPCore (x y)
:precision binary64
(/ (/ (* x (/ y (+ y x))) (+ y x)) (+ x (+ y 1.0))))
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 / (y + x))) / (y + x)) / (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
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * (y / (y + x))) / (y + x)) / (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));
}
↓
public static double code(double x, double y) {
return ((x * (y / (y + x))) / (y + x)) / (x + (y + 1.0));
}
def code(x, y):
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
↓
def code(x, y):
return ((x * (y / (y + x))) / (y + x)) / (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 code(x, y)
return Float64(Float64(Float64(x * Float64(y / Float64(y + x))) / Float64(y + x)) / Float64(x + Float64(y + 1.0)))
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 / (y + x))) / (y + x)) / (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]
↓
code[x_, y_] := N[(N[(N[(x * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $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{\frac{x \cdot \frac{y}{y + x}}{y + x}}{x + \left(y + 1\right)}
Alternatives
| Alternative 1 |
|---|
| Error | 37.51% |
|---|
| Cost | 1292 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\
\mathbf{if}\;x \leq -0.0026:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.16 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\left(y + 1\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x}{y + x}}{-1 - \left(y + x \cdot 2\right)}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 8.83% |
|---|
| Cost | 1220 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+139}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(\frac{y + \left(x + 1\right)}{y} \cdot \left(y + x\right)\right)}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 38.14% |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
t_1 := \frac{\frac{y}{y + x}}{t_0}\\
\mathbf{if}\;x \leq -0.155:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -6.4 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\left(y + 1\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-122}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 14.13% |
|---|
| Cost | 1092 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.4:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(\left(y + x\right) \cdot \frac{y + 1}{y}\right)}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 38.4% |
|---|
| Cost | 1036 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -0.0033:\\
\;\;\;\;\frac{\frac{y}{x}}{t_0}\\
\mathbf{elif}\;x \leq -2.16 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\left(y + 1\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-122}:\\
\;\;\;\;\frac{-y}{x \cdot \left(-1 - \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 38.47% |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x + 1}\\
\mathbf{if}\;x \leq -0.43:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.16 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\left(y + 1\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 38.42% |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
t_1 := \frac{\frac{y}{x}}{t_0}\\
\mathbf{if}\;x \leq -0.045:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.85 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\left(y + 1\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-122}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 46.64% |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;x \leq -54:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-38}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{-163}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 46.18% |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -54:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -2.15 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{-163}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-164}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 45.28% |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -51:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -6 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{-163}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-161}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 39.39% |
|---|
| Cost | 845 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -54:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-38} \lor \neg \left(x \leq -6 \cdot 10^{-123}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 39.38% |
|---|
| Cost | 845 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -54:\\
\;\;\;\;\frac{y \cdot \frac{1}{x}}{x}\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-38} \lor \neg \left(x \leq -2.3 \cdot 10^{-122}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 38.89% |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -54:\\
\;\;\;\;\frac{y \cdot \frac{1}{x}}{x}\\
\mathbf{elif}\;x \leq -1.98 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-122}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 38.7% |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x + 1}\\
\mathbf{if}\;x \leq -0.052:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 38.68% |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x + 1}\\
\mathbf{if}\;x \leq -0.33:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -6.1 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\left(y + 1\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-123}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 56.79% |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{-193}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 72.32% |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -4:\\
\;\;\;\;\frac{0.5}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 65.88% |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-164}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 95.8% |
|---|
| Cost | 192 |
|---|
\[\frac{0.5}{x}
\]