\[\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}{y + x} \cdot \frac{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
(/ (* (/ y (+ y x)) (/ 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 ((y / (y + x)) * (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 = ((y / (y + x)) * (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 ((y / (y + x)) * (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 ((y / (y + x)) * (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(y / Float64(y + x)) * Float64(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 = ((y / (y + x)) * (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[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $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{y}{y + x} \cdot \frac{x}{y + x}}{x + \left(y + 1\right)}
Alternatives
| Alternative 1 |
|---|
| Error | 24.3 |
|---|
| Cost | 1356 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{-y}{y + x}}{-1 - \left(y + x\right)}\\
\mathbf{elif}\;x \leq -1.95 \cdot 10^{-94}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-133}:\\
\;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{x}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 19.5 |
|---|
| Cost | 1352 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+123}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{-1}{-1 - \left(y + x\right)}\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-156}:\\
\;\;\;\;\frac{x}{\frac{y + \left(x + 1\right)}{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 24.3 |
|---|
| Cost | 1164 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{-y}{y + x}}{-1 - \left(y + x\right)}\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{-13}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 24.6 |
|---|
| Cost | 1108 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot \left(y + 1\right)}\\
t_1 := \frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -8.2 \cdot 10^{-96}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 23.6 |
|---|
| Cost | 1104 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
t_1 := \frac{\frac{y}{x}}{t_0}\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{-y}{x \cdot \left(-1 - \left(y + x\right)\right)}\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-95}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -8.4 \cdot 10^{-134}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 23.6 |
|---|
| Cost | 1104 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{y + \left(x + 1\right)}\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{-13}:\\
\;\;\;\;\frac{-y}{x \cdot \left(-1 - \left(y + x\right)\right)}\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{-95}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -8.4 \cdot 10^{-134}:\\
\;\;\;\;\frac{\frac{y}{x}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 24.8 |
|---|
| Cost | 1092 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -3.1 \cdot 10^{-137}:\\
\;\;\;\;\frac{\frac{y \cdot \frac{x}{y + x}}{x}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 24.6 |
|---|
| Cost | 976 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{if}\;x \leq -8 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-95}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-133}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;x \leq 10^{+29}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 24.5 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;x \leq -8.2 \cdot 10^{-96}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-134}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 24.4 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
t_1 := \frac{\frac{y}{x}}{t_0}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -8.2 \cdot 10^{-96}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t_0}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 36.7 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{-225}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-185}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-139}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 26.0 |
|---|
| Cost | 844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-133}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+37}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 30.7 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-134}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-116}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 30.3 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-135}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 29.8 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-134}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 1.06 \cdot 10^{-115}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 43.8 |
|---|
| Cost | 589 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{-225} \lor \neg \left(y \leq 2.7 \cdot 10^{-185}\right) \land y \leq 3.4 \cdot 10^{-138}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 47.0 |
|---|
| Cost | 324 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.00182:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 61.3 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{x}
\]