\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\]
↓
\[{k}^{-0.5} \cdot \sqrt{{\left(2 \cdot \pi\right)}^{\left(1 - k\right)} \cdot \frac{n}{{n}^{k}}}
\]
(FPCore (k n)
:precision binary64
(* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
↓
(FPCore (k n)
:precision binary64
(* (pow k -0.5) (sqrt (* (pow (* 2.0 PI) (- 1.0 k)) (/ n (pow n k))))))
double code(double k, double n) {
return (1.0 / sqrt(k)) * pow(((2.0 * ((double) M_PI)) * n), ((1.0 - k) / 2.0));
}
↓
double code(double k, double n) {
return pow(k, -0.5) * sqrt((pow((2.0 * ((double) M_PI)), (1.0 - k)) * (n / pow(n, k))));
}
public static double code(double k, double n) {
return (1.0 / Math.sqrt(k)) * Math.pow(((2.0 * Math.PI) * n), ((1.0 - k) / 2.0));
}
↓
public static double code(double k, double n) {
return Math.pow(k, -0.5) * Math.sqrt((Math.pow((2.0 * Math.PI), (1.0 - k)) * (n / Math.pow(n, k))));
}
def code(k, n):
return (1.0 / math.sqrt(k)) * math.pow(((2.0 * math.pi) * n), ((1.0 - k) / 2.0))
↓
def code(k, n):
return math.pow(k, -0.5) * math.sqrt((math.pow((2.0 * math.pi), (1.0 - k)) * (n / math.pow(n, k))))
function code(k, n)
return Float64(Float64(1.0 / sqrt(k)) * (Float64(Float64(2.0 * pi) * n) ^ Float64(Float64(1.0 - k) / 2.0)))
end
↓
function code(k, n)
return Float64((k ^ -0.5) * sqrt(Float64((Float64(2.0 * pi) ^ Float64(1.0 - k)) * Float64(n / (n ^ k)))))
end
function tmp = code(k, n)
tmp = (1.0 / sqrt(k)) * (((2.0 * pi) * n) ^ ((1.0 - k) / 2.0));
end
↓
function tmp = code(k, n)
tmp = (k ^ -0.5) * sqrt((((2.0 * pi) ^ (1.0 - k)) * (n / (n ^ k))));
end
code[k_, n_] := N[(N[(1.0 / N[Sqrt[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 * Pi), $MachinePrecision] * n), $MachinePrecision], N[(N[(1.0 - k), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[k_, n_] := N[(N[Power[k, -0.5], $MachinePrecision] * N[Sqrt[N[(N[Power[N[(2.0 * Pi), $MachinePrecision], N[(1.0 - k), $MachinePrecision]], $MachinePrecision] * N[(n / N[Power[n, k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
↓
{k}^{-0.5} \cdot \sqrt{{\left(2 \cdot \pi\right)}^{\left(1 - k\right)} \cdot \frac{n}{{n}^{k}}}
Alternatives
| Alternative 1 |
|---|
| Error | 0.4 |
|---|
| Cost | 26240 |
|---|
\[{k}^{-0.5} \cdot \sqrt{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(1 - k\right)}}
\]
| Alternative 2 |
|---|
| Error | 0.5 |
|---|
| Cost | 20032 |
|---|
\[\sqrt{\frac{1}{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\]
| Alternative 3 |
|---|
| Error | 0.4 |
|---|
| Cost | 19972 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 1.3230474388299305 \cdot 10^{-17}:\\
\;\;\;\;{k}^{-0.5} \cdot \sqrt{2 \cdot \left(\pi \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(k \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k + -1\right)}\right)}^{-0.5}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 0.4 |
|---|
| Cost | 19968 |
|---|
\[{k}^{-0.5} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\]
| Alternative 5 |
|---|
| Error | 0.5 |
|---|
| Cost | 19908 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \left(\pi \cdot n\right)\\
\mathbf{if}\;k \leq 1.3230474388299305 \cdot 10^{-17}:\\
\;\;\;\;{k}^{-0.5} \cdot \sqrt{t_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{t_0}^{\left(1 - k\right)}}{k}}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 0.4 |
|---|
| Cost | 19904 |
|---|
\[\frac{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{\left(0.5 + k \cdot -0.5\right)}}{\sqrt{k}}
\]
| Alternative 7 |
|---|
| Error | 2.5 |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 1.3230474388299305 \cdot 10^{-17}:\\
\;\;\;\;{k}^{-0.5} \cdot \sqrt{2 \cdot \left(\pi \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(\left(1 + \frac{\pi}{k}\right) + -1\right)\right)}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 2.5 |
|---|
| Cost | 19716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 1.3230474388299305 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\pi}{k}} \cdot \sqrt{n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(\left(1 + \frac{\pi}{k}\right) + -1\right)\right)}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 2.4 |
|---|
| Cost | 19716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 1.6644590962652856 \cdot 10^{-13}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(\left(1 + \frac{\pi}{k}\right) + -1\right)\right)}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 13.1 |
|---|
| Cost | 13440 |
|---|
\[\sqrt{2 \cdot \left(n \cdot \left(\left(1 + \frac{\pi}{k}\right) + -1\right)\right)}
\]
| Alternative 11 |
|---|
| Error | 31.7 |
|---|
| Cost | 13248 |
|---|
\[{\left(0.5 \cdot \frac{\frac{k}{n}}{\pi}\right)}^{-0.5}
\]
| Alternative 12 |
|---|
| Error | 32.3 |
|---|
| Cost | 13184 |
|---|
\[\sqrt{2 \cdot \frac{n}{\frac{k}{\pi}}}
\]
| Alternative 13 |
|---|
| Error | 32.3 |
|---|
| Cost | 13184 |
|---|
\[\sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}
\]