\[3 \cdot \left(\left(\left(x \cdot 3\right) \cdot x - x \cdot 4\right) + 1\right)
\]
↓
\[3 + \left(\left(x \cdot 3\right) \cdot -4 + 9 \cdot \left(x \cdot x\right)\right)
\]
(FPCore (x) :precision binary64 (* 3.0 (+ (- (* (* x 3.0) x) (* x 4.0)) 1.0)))
↓
(FPCore (x) :precision binary64 (+ 3.0 (+ (* (* x 3.0) -4.0) (* 9.0 (* x x)))))
double code(double x) {
return 3.0 * ((((x * 3.0) * x) - (x * 4.0)) + 1.0);
}
↓
double code(double x) {
return 3.0 + (((x * 3.0) * -4.0) + (9.0 * (x * x)));
}
real(8) function code(x)
real(8), intent (in) :: x
code = 3.0d0 * ((((x * 3.0d0) * x) - (x * 4.0d0)) + 1.0d0)
end function
↓
real(8) function code(x)
real(8), intent (in) :: x
code = 3.0d0 + (((x * 3.0d0) * (-4.0d0)) + (9.0d0 * (x * x)))
end function
public static double code(double x) {
return 3.0 * ((((x * 3.0) * x) - (x * 4.0)) + 1.0);
}
↓
public static double code(double x) {
return 3.0 + (((x * 3.0) * -4.0) + (9.0 * (x * x)));
}
def code(x):
return 3.0 * ((((x * 3.0) * x) - (x * 4.0)) + 1.0)
↓
def code(x):
return 3.0 + (((x * 3.0) * -4.0) + (9.0 * (x * x)))
function code(x)
return Float64(3.0 * Float64(Float64(Float64(Float64(x * 3.0) * x) - Float64(x * 4.0)) + 1.0))
end
↓
function code(x)
return Float64(3.0 + Float64(Float64(Float64(x * 3.0) * -4.0) + Float64(9.0 * Float64(x * x))))
end
function tmp = code(x)
tmp = 3.0 * ((((x * 3.0) * x) - (x * 4.0)) + 1.0);
end
↓
function tmp = code(x)
tmp = 3.0 + (((x * 3.0) * -4.0) + (9.0 * (x * x)));
end
code[x_] := N[(3.0 * N[(N[(N[(N[(x * 3.0), $MachinePrecision] * x), $MachinePrecision] - N[(x * 4.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_] := N[(3.0 + N[(N[(N[(x * 3.0), $MachinePrecision] * -4.0), $MachinePrecision] + N[(9.0 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
3 \cdot \left(\left(\left(x \cdot 3\right) \cdot x - x \cdot 4\right) + 1\right)
↓
3 + \left(\left(x \cdot 3\right) \cdot -4 + 9 \cdot \left(x \cdot x\right)\right)
Alternatives
| Alternative 1 |
|---|
| Error | 1.1 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(9 \cdot x + -12\right)\\
\mathbf{if}\;x \leq -12.228803319296599:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.002745088229694357:\\
\;\;\;\;3 + x \cdot -12\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.1 |
|---|
| Cost | 704 |
|---|
\[3 + 3 \cdot \left(x \cdot \left(x \cdot 3 + -4\right)\right)
\]
| Alternative 3 |
|---|
| Error | 2.1 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := 9 \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -12.228803319296599:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.615455569823281:\\
\;\;\;\;3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.5 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := 9 \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -12.228803319296599:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.002745088229694357:\\
\;\;\;\;3 + x \cdot -12\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.5 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -12.228803319296599:\\
\;\;\;\;x \cdot \left(9 \cdot x\right)\\
\mathbf{elif}\;x \leq 0.002745088229694357:\\
\;\;\;\;3 + x \cdot -12\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot x\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 20.7 |
|---|
| Cost | 64 |
|---|
\[3
\]