\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\]
↓
\[\begin{array}{l}
t_0 := 0.5 \cdot \left(1 - k\right)\\
{\left(n \cdot \pi\right)}^{t_0} \cdot \frac{{2}^{t_0}}{\sqrt{k}}
\end{array}
\]
(FPCore (k n)
:precision binary64
(* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
↓
(FPCore (k n)
:precision binary64
(let* ((t_0 (* 0.5 (- 1.0 k))))
(* (pow (* n PI) t_0) (/ (pow 2.0 t_0) (sqrt 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) {
double t_0 = 0.5 * (1.0 - k);
return pow((n * ((double) M_PI)), t_0) * (pow(2.0, t_0) / sqrt(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) {
double t_0 = 0.5 * (1.0 - k);
return Math.pow((n * Math.PI), t_0) * (Math.pow(2.0, t_0) / Math.sqrt(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):
t_0 = 0.5 * (1.0 - k)
return math.pow((n * math.pi), t_0) * (math.pow(2.0, t_0) / math.sqrt(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)
t_0 = Float64(0.5 * Float64(1.0 - k))
return Float64((Float64(n * pi) ^ t_0) * Float64((2.0 ^ t_0) / sqrt(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)
t_0 = 0.5 * (1.0 - k);
tmp = ((n * pi) ^ t_0) * ((2.0 ^ t_0) / sqrt(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_] := Block[{t$95$0 = N[(0.5 * N[(1.0 - k), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(n * Pi), $MachinePrecision], t$95$0], $MachinePrecision] * N[(N[Power[2.0, t$95$0], $MachinePrecision] / N[Sqrt[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
↓
\begin{array}{l}
t_0 := 0.5 \cdot \left(1 - k\right)\\
{\left(n \cdot \pi\right)}^{t_0} \cdot \frac{{2}^{t_0}}{\sqrt{k}}
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.95% |
|---|
| Cost | 19908 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 3.2 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{\frac{2}{k}} \cdot \sqrt{n \cdot \pi}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(1 - k\right)}}{k}}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.7% |
|---|
| Cost | 19904 |
|---|
\[\frac{{\left(\pi \cdot \left(n \cdot 2\right)\right)}^{\left(0.5 - \frac{k}{2}\right)}}{\sqrt{k}}
\]
| Alternative 3 |
|---|
| Error | 34.5% |
|---|
| Cost | 19584 |
|---|
\[\sqrt{\frac{2}{k}} \cdot \sqrt{n \cdot \pi}
\]
| Alternative 4 |
|---|
| Error | 34.47% |
|---|
| Cost | 19584 |
|---|
\[\frac{\sqrt{n \cdot \pi}}{\sqrt{\frac{k}{2}}}
\]
| Alternative 5 |
|---|
| Error | 50.12% |
|---|
| Cost | 13312 |
|---|
\[\frac{1}{\sqrt{\frac{k}{\pi \cdot \left(n \cdot 2\right)}}}
\]
| Alternative 6 |
|---|
| Error | 50.13% |
|---|
| Cost | 13312 |
|---|
\[\frac{1}{\sqrt{\frac{\frac{\frac{k}{n}}{2}}{\pi}}}
\]
| Alternative 7 |
|---|
| Error | 50.97% |
|---|
| Cost | 13184 |
|---|
\[\sqrt{2 \cdot \left(\pi \cdot \frac{n}{k}\right)}
\]
| Alternative 8 |
|---|
| Error | 50.97% |
|---|
| Cost | 13184 |
|---|
\[\sqrt{2 \cdot \frac{n}{\frac{k}{\pi}}}
\]
| Alternative 9 |
|---|
| Error | 50.97% |
|---|
| Cost | 13184 |
|---|
\[\sqrt{2 \cdot \frac{\pi}{\frac{k}{n}}}
\]
| Alternative 10 |
|---|
| Error | 51% |
|---|
| Cost | 13184 |
|---|
\[\sqrt{n \cdot \frac{\pi \cdot 2}{k}}
\]