\[\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}{\left(x + y\right) + 1}}{x + y} \cdot \frac{x}{x + y}
\]
(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 (+ 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 ((y / ((x + y) + 1.0)) / (x + y)) * (x / (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 = ((y / ((x + y) + 1.0d0)) / (x + y)) * (x / (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 ((y / ((x + y) + 1.0)) / (x + y)) * (x / (x + y));
}
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 / (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(y / Float64(Float64(x + y) + 1.0)) / Float64(x + y)) * Float64(x / 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 = ((y / ((x + y) + 1.0)) / (x + y)) * (x / (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[(y / N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $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}{\left(x + y\right) + 1}}{x + y} \cdot \frac{x}{x + y}
Alternatives
| Alternative 1 |
|---|
| Error | 13.3 |
|---|
| Cost | 1232 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}\\
t_1 := \frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{-43}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-29}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 6.2 |
|---|
| Cost | 1224 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(x + y\right) \cdot \left(\left(x + y\right) + 1\right)}\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 13200000000:\\
\;\;\;\;\frac{\frac{y}{1 + y} \cdot \frac{x}{x + y}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 23.2 |
|---|
| Cost | 1176 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
t_1 := \frac{x}{y} + \left(-x\right)\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-139}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;y \leq 1.38 \cdot 10^{-154}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.76:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 23.3 |
|---|
| Cost | 1112 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-139}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;y \leq 3.05 \cdot 10^{-155}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 17.0 |
|---|
| Cost | 1104 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{y}{1 + x}}{x + y}\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{+128}:\\
\;\;\;\;\frac{y}{\left(1 + x\right) \cdot x}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{+88}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 0.1 |
|---|
| Cost | 1088 |
|---|
\[\frac{\frac{x}{x + y}}{\left(x + y\right) + 1} \cdot \frac{y}{x + y}
\]
| Alternative 7 |
|---|
| Error | 17.5 |
|---|
| Cost | 976 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(1 + x\right) \cdot x}\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{+128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{+89}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + y}\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 30.3 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{x \cdot x}\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-105}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+147}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 22.0 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{x \cdot x}\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{+143}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+147}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 16.9 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\left(1 + x\right) \cdot x}\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{-22}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 36.8 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-104}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 61.5 |
|---|
| Cost | 192 |
|---|
\[\frac{-1}{y}
\]
| Alternative 13 |
|---|
| Error | 61.3 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{x}
\]
| Alternative 14 |
|---|
| Error | 61.3 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{y}
\]
| Alternative 15 |
|---|
| Error | 47.2 |
|---|
| Cost | 192 |
|---|
\[\frac{x}{y}
\]