\[\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}
\]
↓
\[\frac{0.3333333333333333 - 0.3333333333333333 \cdot x}{\frac{y}{3 - x}}
\]
(FPCore (x y) :precision binary64 (/ (* (- 1.0 x) (- 3.0 x)) (* y 3.0)))
↓
(FPCore (x y)
:precision binary64
(/ (- 0.3333333333333333 (* 0.3333333333333333 x)) (/ y (- 3.0 x))))
double code(double x, double y) {
return ((1.0 - x) * (3.0 - x)) / (y * 3.0);
}
↓
double code(double x, double y) {
return (0.3333333333333333 - (0.3333333333333333 * x)) / (y / (3.0 - x));
}
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 = (0.3333333333333333d0 - (0.3333333333333333d0 * x)) / (y / (3.0d0 - x))
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 (0.3333333333333333 - (0.3333333333333333 * x)) / (y / (3.0 - x));
}
def code(x, y):
return ((1.0 - x) * (3.0 - x)) / (y * 3.0)
↓
def code(x, y):
return (0.3333333333333333 - (0.3333333333333333 * x)) / (y / (3.0 - x))
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(0.3333333333333333 - Float64(0.3333333333333333 * x)) / Float64(y / Float64(3.0 - x)))
end
function tmp = code(x, y)
tmp = ((1.0 - x) * (3.0 - x)) / (y * 3.0);
end
↓
function tmp = code(x, y)
tmp = (0.3333333333333333 - (0.3333333333333333 * x)) / (y / (3.0 - x));
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[(0.3333333333333333 - N[(0.3333333333333333 * x), $MachinePrecision]), $MachinePrecision] / N[(y / N[(3.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}
↓
\frac{0.3333333333333333 - 0.3333333333333333 \cdot x}{\frac{y}{3 - x}}
Alternatives
| Alternative 1 |
|---|
| Error | 1.9 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{x}{y} \cdot \left(x + -4\right)}{3}\\
\mathbf{if}\;x \leq -11.078305554308654:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.2856259858056446 \cdot 10^{-15}:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.9 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
t_0 := \frac{\frac{x}{y} \cdot \left(x + -4\right)}{3}\\
\mathbf{if}\;x \leq -11.078305554308654:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.2856259858056446 \cdot 10^{-15}:\\
\;\;\;\;\frac{1}{y} + \frac{x}{y} \cdot -1.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 2.1 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \left(0.3333333333333333 \cdot x\right) \cdot \frac{x}{y}\\
\mathbf{if}\;x \leq -11.078305554308654:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.4949792997782296:\\
\;\;\;\;\frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 2.1 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \frac{x \cdot \frac{x}{y}}{3}\\
\mathbf{if}\;x \leq -11.078305554308654:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.4949792997782296:\\
\;\;\;\;\frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.6 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \frac{x \cdot \frac{x}{y}}{3}\\
\mathbf{if}\;x \leq -11.078305554308654:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.4949792997782296:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.6 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \frac{x}{y \cdot 3}\\
\mathbf{if}\;x \leq -11.078305554308654:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.4949792997782296:\\
\;\;\;\;\frac{1 + x \cdot -1.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 21.5 |
|---|
| Cost | 192 |
|---|
\[\frac{1}{y}
\]