\[\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{y}{x + \left(y + 1\right)} \cdot \frac{x}{y + x}}{y + x}
\]
(FPCore (x y)
:precision binary64
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
↓
(FPCore (x y)
:precision binary64
(/ (* (/ y (+ x (+ y 1.0))) (/ x (+ y 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 ((y / (x + (y + 1.0))) * (x / (y + 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 = ((y / (x + (y + 1.0d0))) * (x / (y + 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 ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x);
}
def code(x, y):
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
↓
def code(x, y):
return ((y / (x + (y + 1.0))) * (x / (y + 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(Float64(y / Float64(x + Float64(y + 1.0))) * Float64(x / Float64(y + 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 = ((y / (x + (y + 1.0))) * (x / (y + 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[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $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{y}{x + \left(y + 1\right)} \cdot \frac{x}{y + x}}{y + x}
Alternatives
| Alternative 1 |
|---|
| Error | 26.5 |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{y + \left(x + 1\right)}\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-154}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 23.5 |
|---|
| Cost | 1096 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 7.2 \cdot 10^{-221}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{y + \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{+109}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(\left(y + 1\right) + x \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y}}{\frac{y + x}{x}}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 23.5 |
|---|
| Cost | 1096 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 7.2 \cdot 10^{-221}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{1}{y + \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{+109}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(\left(y + 1\right) + x \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y}}{\frac{y + x}{x}}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 12.6 |
|---|
| Cost | 1092 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+25}:\\
\;\;\;\;t_0 \cdot \left(\frac{y}{y + x} \cdot \frac{1}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0 \cdot \frac{y}{y + 1}}{y + x}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.1 |
|---|
| Cost | 1088 |
|---|
\[\frac{\frac{x}{y + x} \cdot \frac{y}{y + x}}{x + \left(y + 1\right)}
\]
| Alternative 6 |
|---|
| Error | 27.1 |
|---|
| Cost | 976 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-154}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 26.9 |
|---|
| Cost | 976 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-154}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + x}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 26.6 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-154}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 26.7 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-154}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 31.3 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-23}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 30.8 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 30.3 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -9.2 \cdot 10^{-176}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 26.7 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-17}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-154}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 26.7 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -2.75 \cdot 10^{-155}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 26.7 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-154}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 35.6 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 3.2 \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 17 |
|---|
| Error | 47.3 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 43.3 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 61.3 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{x}
\]
| Alternative 20 |
|---|
| Error | 61.8 |
|---|
| Cost | 64 |
|---|
\[0.5
\]