\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;k \leq 2.6057697274586915 \cdot 10^{-83}:\\
\;\;\;\;\frac{\sqrt{n}}{\sqrt{k \cdot \frac{0.5}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{k}{{\left(\pi \cdot \left(n + n\right)\right)}^{\left(1 - k\right)}}\right)}^{-0.5}\\
\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
(if (<= k 2.6057697274586915e-83)
(/ (sqrt n) (sqrt (* k (/ 0.5 PI))))
(pow (/ k (pow (* PI (+ n n)) (- 1.0 k))) -0.5)))
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 tmp;
if (k <= 2.6057697274586915e-83) {
tmp = sqrt(n) / sqrt((k * (0.5 / ((double) M_PI))));
} else {
tmp = pow((k / pow((((double) M_PI) * (n + n)), (1.0 - k))), -0.5);
}
return tmp;
}
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 tmp;
if (k <= 2.6057697274586915e-83) {
tmp = Math.sqrt(n) / Math.sqrt((k * (0.5 / Math.PI)));
} else {
tmp = Math.pow((k / Math.pow((Math.PI * (n + n)), (1.0 - k))), -0.5);
}
return tmp;
}
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):
tmp = 0
if k <= 2.6057697274586915e-83:
tmp = math.sqrt(n) / math.sqrt((k * (0.5 / math.pi)))
else:
tmp = math.pow((k / math.pow((math.pi * (n + n)), (1.0 - k))), -0.5)
return tmp
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)
tmp = 0.0
if (k <= 2.6057697274586915e-83)
tmp = Float64(sqrt(n) / sqrt(Float64(k * Float64(0.5 / pi))));
else
tmp = Float64(k / (Float64(pi * Float64(n + n)) ^ Float64(1.0 - k))) ^ -0.5;
end
return tmp
end
function tmp = code(k, n)
tmp = (1.0 / sqrt(k)) * (((2.0 * pi) * n) ^ ((1.0 - k) / 2.0));
end
↓
function tmp_2 = code(k, n)
tmp = 0.0;
if (k <= 2.6057697274586915e-83)
tmp = sqrt(n) / sqrt((k * (0.5 / pi)));
else
tmp = (k / ((pi * (n + n)) ^ (1.0 - k))) ^ -0.5;
end
tmp_2 = tmp;
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_] := If[LessEqual[k, 2.6057697274586915e-83], N[(N[Sqrt[n], $MachinePrecision] / N[Sqrt[N[(k * N[(0.5 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[(k / N[Power[N[(Pi * N[(n + n), $MachinePrecision]), $MachinePrecision], N[(1.0 - k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
↓
\begin{array}{l}
\mathbf{if}\;k \leq 2.6057697274586915 \cdot 10^{-83}:\\
\;\;\;\;\frac{\sqrt{n}}{\sqrt{k \cdot \frac{0.5}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{k}{{\left(\pi \cdot \left(n + n\right)\right)}^{\left(1 - k\right)}}\right)}^{-0.5}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.4 |
|---|
| Cost | 32896 |
|---|
\[\begin{array}{l}
t_0 := n \cdot \left(2 \cdot \pi\right)\\
\frac{{t_0}^{\left(k \cdot -0.5\right)} \cdot \sqrt{t_0}}{\sqrt{k}}
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.5 |
|---|
| Cost | 20032 |
|---|
\[\sqrt{\frac{1}{k}} \cdot {\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(\frac{1 - k}{2}\right)}
\]
| Alternative 3 |
|---|
| Error | 0.5 |
|---|
| Cost | 19968 |
|---|
\[{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(\frac{1 - k}{2}\right)} \cdot {k}^{-0.5}
\]
| Alternative 4 |
|---|
| Error | 1.3 |
|---|
| Cost | 19908 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 2.6057697274586915 \cdot 10^{-83}:\\
\;\;\;\;\frac{\sqrt{n}}{\sqrt{k \cdot \frac{0.5}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{\left(1 - k\right)}}{k}}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 21.2 |
|---|
| Cost | 19844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{+80}:\\
\;\;\;\;\frac{\sqrt{n}}{\sqrt{k \cdot \frac{0.5}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\frac{\frac{k}{2 \cdot \pi}}{n}\right)}^{1.5}\right)}^{-0.3333333333333333}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 13.0 |
|---|
| Cost | 19844 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 48000000:\\
\;\;\;\;\frac{\sqrt{n}}{\sqrt{k \cdot \frac{0.5}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{n}{k}, 2 \cdot \pi, 1\right) + -1}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 21.4 |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
\mathbf{if}\;k \leq 1.65 \cdot 10^{+88}:\\
\;\;\;\;\frac{\sqrt{n}}{\sqrt{k \cdot \frac{0.5}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(n \cdot \left(2 \cdot \frac{\pi}{k}\right)\right)}^{1.5}}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 22.3 |
|---|
| Cost | 19584 |
|---|
\[\sqrt{n} \cdot \sqrt{2 \cdot \frac{\pi}{k}}
\]
| Alternative 9 |
|---|
| Error | 22.2 |
|---|
| Cost | 19584 |
|---|
\[\frac{\sqrt{n}}{\sqrt{k \cdot \frac{0.5}{\pi}}}
\]
| Alternative 10 |
|---|
| Error | 31.9 |
|---|
| Cost | 13248 |
|---|
\[{\left(\frac{\frac{k}{2 \cdot \pi}}{n}\right)}^{-0.5}
\]
| Alternative 11 |
|---|
| Error | 32.5 |
|---|
| Cost | 13184 |
|---|
\[\sqrt{\frac{n}{k \cdot \frac{0.5}{\pi}}}
\]
| Alternative 12 |
|---|
| Error | 32.5 |
|---|
| Cost | 13184 |
|---|
\[\sqrt{\frac{n \cdot \left(2 \cdot \pi\right)}{k}}
\]
| Alternative 13 |
|---|
| Error | 32.5 |
|---|
| Cost | 13184 |
|---|
\[\sqrt{\frac{2 \cdot \pi}{\frac{k}{n}}}
\]
| Alternative 14 |
|---|
| Error | 32.5 |
|---|
| Cost | 13184 |
|---|
\[\sqrt{\left(2 \cdot \pi\right) \cdot \frac{n}{k}}
\]