\[\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}
\]
↓
\[\frac{x + -3}{3} \cdot \frac{x + -1}{y}
\]
(FPCore (x y) :precision binary64 (/ (* (- 1.0 x) (- 3.0 x)) (* y 3.0)))
↓
(FPCore (x y) :precision binary64 (* (/ (+ x -3.0) 3.0) (/ (+ x -1.0) y)))
double code(double x, double y) {
return ((1.0 - x) * (3.0 - x)) / (y * 3.0);
}
↓
double code(double x, double y) {
return ((x + -3.0) / 3.0) * ((x + -1.0) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((1.0d0 - x) * (3.0d0 - x)) / (y * 3.0d0)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x + (-3.0d0)) / 3.0d0) * ((x + (-1.0d0)) / y)
end function
public static double code(double x, double y) {
return ((1.0 - x) * (3.0 - x)) / (y * 3.0);
}
↓
public static double code(double x, double y) {
return ((x + -3.0) / 3.0) * ((x + -1.0) / y);
}
def code(x, y):
return ((1.0 - x) * (3.0 - x)) / (y * 3.0)
↓
def code(x, y):
return ((x + -3.0) / 3.0) * ((x + -1.0) / y)
function code(x, y)
return Float64(Float64(Float64(1.0 - x) * Float64(3.0 - x)) / Float64(y * 3.0))
end
↓
function code(x, y)
return Float64(Float64(Float64(x + -3.0) / 3.0) * Float64(Float64(x + -1.0) / y))
end
function tmp = code(x, y)
tmp = ((1.0 - x) * (3.0 - x)) / (y * 3.0);
end
↓
function tmp = code(x, y)
tmp = ((x + -3.0) / 3.0) * ((x + -1.0) / y);
end
code[x_, y_] := N[(N[(N[(1.0 - x), $MachinePrecision] * N[(3.0 - x), $MachinePrecision]), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(N[(N[(x + -3.0), $MachinePrecision] / 3.0), $MachinePrecision] * N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}
↓
\frac{x + -3}{3} \cdot \frac{x + -1}{y}
Alternatives
| Alternative 1 |
|---|
| Error | 1.4 |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \lor \neg \left(x \leq 3\right):\\
\;\;\;\;\left(1 - x\right) \cdot \frac{\frac{x}{-3}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.4 |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \lor \neg \left(x \leq 1.3\right):\\
\;\;\;\;\frac{3 - x}{-3 \cdot \frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.4 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.3:\\
\;\;\;\;\frac{3 - x}{\frac{y}{\frac{x}{-3}}}\\
\mathbf{elif}\;x \leq 1.3:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{3 - x}{-3 \cdot \frac{y}{x}}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.4 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.3:\\
\;\;\;\;\frac{3 - x}{\frac{y}{\frac{x}{-3}}}\\
\mathbf{elif}\;x \leq 1.3:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{x + -3}{3}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.9 |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \lor \neg \left(x \leq 3\right):\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{y}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.9 |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \lor \neg \left(x \leq 3\right):\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 - x\right) \cdot \frac{1}{y}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 1.9 |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \lor \neg \left(x \leq 3\right):\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} - \frac{x}{y}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 1.5 |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \lor \neg \left(x \leq 3\right):\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 1.4 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.8:\\
\;\;\;\;\left(1 - x\right) \cdot \left(-0.3333333333333333 \cdot \frac{x}{y}\right)\\
\mathbf{elif}\;x \leq 3:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot \frac{x}{y}\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 0.4 |
|---|
| Cost | 704 |
|---|
\[\left(1 - x\right) \cdot \left(\left(x + -3\right) \cdot \frac{-0.3333333333333333}{y}\right)
\]
| Alternative 11 |
|---|
| Error | 0.2 |
|---|
| Cost | 704 |
|---|
\[\left(x + -1\right) \cdot \frac{0.3333333333333333 \cdot \left(x + -3\right)}{y}
\]
| Alternative 12 |
|---|
| Error | 21.0 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{y}
\]