\[\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{\frac{x}{x + y} \cdot y}{1 + \left(x + y\right)}}{x + y}
\]
(FPCore (x y)
:precision binary64
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
↓
(FPCore (x y)
:precision binary64
(/ (/ (* (/ x (+ x y)) y) (+ 1.0 (+ x y))) (+ 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 / (x + y)) * y) / (1.0 + (x + y))) / (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 / (x + y)) * y) / (1.0d0 + (x + y))) / (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 / (x + y)) * y) / (1.0 + (x + y))) / (x + y);
}
def code(x, y):
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
↓
def code(x, y):
return (((x / (x + y)) * y) / (1.0 + (x + y))) / (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(Float64(Float64(x / Float64(x + y)) * y) / Float64(1.0 + Float64(x + y))) / 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 / (x + y)) * y) / (1.0 + (x + y))) / (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[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / N[(1.0 + N[(x + y), $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{\frac{\frac{x}{x + y} \cdot y}{1 + \left(x + y\right)}}{x + y}
Alternatives
| Alternative 1 |
|---|
| Error | 13.7 |
|---|
| Cost | 1620 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\left(x + y\right) \cdot \left(1 + \left(x + y\right)\right)}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+174}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{x + y}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{+55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-154}:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \frac{x}{1 + x}}{x}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-115}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.115:\\
\;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + x\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 21.5 |
|---|
| Cost | 1368 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x + y}\\
t_1 := \frac{y}{\left(y - -1\right) \cdot x}\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-154}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + x\right)}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 42000000000:\\
\;\;\;\;\frac{\frac{x}{x + y}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 17.0 |
|---|
| Cost | 1368 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x + y}\\
t_1 := \frac{\frac{x}{y - -1}}{x + y}\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+23}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-133}:\\
\;\;\;\;\frac{y}{\left(y - -1\right) \cdot x}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-35}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 42000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 11.9 |
|---|
| Cost | 1356 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(x + y\right) \cdot \left(1 + \left(x + y\right)\right)}\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{-163}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5.7 \cdot 10^{-160}:\\
\;\;\;\;\frac{\frac{x}{y - -1}}{x + y}\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(1 + y\right)}\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \ne 0:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{y + x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 6.8 |
|---|
| Cost | 1356 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{x + y}\\
t_1 := \frac{x}{\left(x + y\right) \cdot \left(1 + \left(x + y\right)\right)}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+174}:\\
\;\;\;\;\frac{t_0}{x + y}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.125:\\
\;\;\;\;\frac{\frac{y}{x - -1} \cdot t_0}{x + y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 21.8 |
|---|
| Cost | 1244 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot \left(1 + x\right)}\\
t_1 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+26}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-166}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-139}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 116000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 21.8 |
|---|
| Cost | 1244 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot \left(1 + x\right)}\\
t_1 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-167}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-139}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 620000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 21.5 |
|---|
| Cost | 1240 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x + y}\\
t_1 := \frac{\frac{x}{y}}{x + y}\\
t_2 := \frac{y}{\left(y - -1\right) \cdot x}\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-161}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-156}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + x\right)}\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 35000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 5.9 |
|---|
| Cost | 1224 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{y + x}\\
t_1 := \frac{y}{\left(x + y\right) \cdot \left(1 + \left(x + y\right)\right)}\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.5:\\
\;\;\;\;\frac{t_0 \cdot x}{\left(y + x\right) \cdot \left(1 + y\right)}\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \ne 0:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{y + x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{x}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 13.1 |
|---|
| Cost | 1104 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(x + y\right) \cdot \left(1 + \left(x + y\right)\right)}\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{x}{y - -1}}{x + y}\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \ne 0:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{y + x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 15.0 |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\left(x + y\right) \cdot \left(1 + \left(x + y\right)\right)}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+174}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{x + y}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{+55}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-154}:\\
\;\;\;\;\frac{\frac{y}{1 + x}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 13.0 |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(x + y\right) \cdot \left(1 + \left(x + y\right)\right)}\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{x}{y - -1}}{x + y}\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + y}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 0.1 |
|---|
| Cost | 1088 |
|---|
\[\frac{\frac{y}{x + y}}{\left(x + y\right) + 1} \cdot \frac{x}{x + y}
\]
| Alternative 14 |
|---|
| Error | 0.1 |
|---|
| Cost | 1088 |
|---|
\[\frac{\frac{y}{1 + \left(x + y\right)} \cdot \frac{x}{x + y}}{x + y}
\]
| Alternative 15 |
|---|
| Error | 21.4 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
t_1 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-177}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 260000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 21.0 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-177}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 340000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 17.4 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{1 + x}}{x + y}\\
\mathbf{if}\;x \leq -1.42 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{x}{y - -1}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 25.3 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;y \leq -2000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.115:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 61.3 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{x}
\]
| Alternative 20 |
|---|
| Error | 47.0 |
|---|
| Cost | 192 |
|---|
\[\frac{y}{x}
\]