\[\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 | 26.61% |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{y + x}\\
t_1 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq -7.1 \cdot 10^{-214}:\\
\;\;\;\;\frac{t_0}{t_1}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+105}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \frac{y + \left(x + 1\right)}{t_0}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_1 \cdot \frac{y + x}{y}}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 35.61% |
|---|
| Cost | 1092 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 2.02 \cdot 10^{-163}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{\left(x + \left(y + 1\right)\right) \cdot \frac{y + x}{y}}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.16% |
|---|
| Cost | 1088 |
|---|
\[\frac{\frac{y}{y + x} \cdot \frac{x}{y + x}}{x + \left(y + 1\right)}
\]
| Alternative 4 |
|---|
| Error | 37.3% |
|---|
| Cost | 964 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{\left(y + 1\right) + x \cdot 2}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 38.14% |
|---|
| Cost | 836 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.28 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 47.8% |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-149}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;y \leq 2.02 \cdot 10^{-163}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.76:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 47.12% |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{-149}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{-169}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 38.36% |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 38.26% |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{-25}:\\
\;\;\;\;\frac{\frac{y}{x}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 55.31% |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.35 \cdot 10^{-163}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.76:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 39.28% |
|---|
| Cost | 580 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -800000:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 38.72% |
|---|
| Cost | 580 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -100000:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 38.47% |
|---|
| Cost | 580 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 73.34% |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -17000:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 65.93% |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{-164}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 95.75% |
|---|
| Cost | 192 |
|---|
\[\frac{1}{x}
\]