\[\frac{6 \cdot \left(x - 1\right)}{\left(x + 1\right) + 4 \cdot \sqrt{x}}
\]
↓
\[\frac{1 - x}{\frac{1 + \left(x + 4 \cdot \sqrt{x}\right)}{-6}}
\]
(FPCore (x)
:precision binary64
(/ (* 6.0 (- x 1.0)) (+ (+ x 1.0) (* 4.0 (sqrt x)))))
↓
(FPCore (x)
:precision binary64
(/ (- 1.0 x) (/ (+ 1.0 (+ x (* 4.0 (sqrt x)))) -6.0)))
double code(double x) {
return (6.0 * (x - 1.0)) / ((x + 1.0) + (4.0 * sqrt(x)));
}
↓
double code(double x) {
return (1.0 - x) / ((1.0 + (x + (4.0 * sqrt(x)))) / -6.0);
}
real(8) function code(x)
real(8), intent (in) :: x
code = (6.0d0 * (x - 1.0d0)) / ((x + 1.0d0) + (4.0d0 * sqrt(x)))
end function
↓
real(8) function code(x)
real(8), intent (in) :: x
code = (1.0d0 - x) / ((1.0d0 + (x + (4.0d0 * sqrt(x)))) / (-6.0d0))
end function
public static double code(double x) {
return (6.0 * (x - 1.0)) / ((x + 1.0) + (4.0 * Math.sqrt(x)));
}
↓
public static double code(double x) {
return (1.0 - x) / ((1.0 + (x + (4.0 * Math.sqrt(x)))) / -6.0);
}
def code(x):
return (6.0 * (x - 1.0)) / ((x + 1.0) + (4.0 * math.sqrt(x)))
↓
def code(x):
return (1.0 - x) / ((1.0 + (x + (4.0 * math.sqrt(x)))) / -6.0)
function code(x)
return Float64(Float64(6.0 * Float64(x - 1.0)) / Float64(Float64(x + 1.0) + Float64(4.0 * sqrt(x))))
end
↓
function code(x)
return Float64(Float64(1.0 - x) / Float64(Float64(1.0 + Float64(x + Float64(4.0 * sqrt(x)))) / -6.0))
end
function tmp = code(x)
tmp = (6.0 * (x - 1.0)) / ((x + 1.0) + (4.0 * sqrt(x)));
end
↓
function tmp = code(x)
tmp = (1.0 - x) / ((1.0 + (x + (4.0 * sqrt(x)))) / -6.0);
end
code[x_] := N[(N[(6.0 * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] + N[(4.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_] := N[(N[(1.0 - x), $MachinePrecision] / N[(N[(1.0 + N[(x + N[(4.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / -6.0), $MachinePrecision]), $MachinePrecision]
\frac{6 \cdot \left(x - 1\right)}{\left(x + 1\right) + 4 \cdot \sqrt{x}}
↓
\frac{1 - x}{\frac{1 + \left(x + 4 \cdot \sqrt{x}\right)}{-6}}
Alternatives
| Alternative 1 |
|---|
| Error | 3.71% |
|---|
| Cost | 7236 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 1.5:\\
\;\;\;\;\frac{\left(1 - x\right) \cdot \left(\left(1 + x\right) \cdot -0.16666666666666666\right)}{-1 - x} \cdot \left(6 \cdot \frac{-6}{1 + x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 6}{4 \cdot \sqrt{x} + \left(1 + x\right)}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.31% |
|---|
| Cost | 7232 |
|---|
\[-6 \cdot \frac{x + -1}{\left(-1 - x\right) - \sqrt{x \cdot 16}}
\]
| Alternative 3 |
|---|
| Error | 0.14% |
|---|
| Cost | 7232 |
|---|
\[\left(x + -1\right) \cdot \frac{6}{x - \left(-1 - 4 \cdot \sqrt{x}\right)}
\]
| Alternative 4 |
|---|
| Error | 0.08% |
|---|
| Cost | 7232 |
|---|
\[\frac{6}{\frac{x - \left(-1 - 4 \cdot \sqrt{x}\right)}{x + -1}}
\]
| Alternative 5 |
|---|
| Error | 4.7% |
|---|
| Cost | 576 |
|---|
\[\frac{1 - x}{\frac{1 + x}{-6}}
\]
| Alternative 6 |
|---|
| Error | 4.71% |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 0.5:\\
\;\;\;\;-6\\
\mathbf{else}:\\
\;\;\;\;6 - \frac{6}{x}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 4.7% |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 0.5:\\
\;\;\;\;x \cdot 12 - 6\\
\mathbf{else}:\\
\;\;\;\;6 - \frac{6}{x}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 4.71% |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;\frac{1 - x}{-0.16666666666666666}\\
\mathbf{else}:\\
\;\;\;\;6 - \frac{6}{x}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 4.71% |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;6 \cdot \left(x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;6 - \frac{6}{x}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 4.71% |
|---|
| Cost | 196 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;-6\\
\mathbf{else}:\\
\;\;\;\;6\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 51.12% |
|---|
| Cost | 64 |
|---|
\[-6
\]