Math FPCore C Java Python Julia MATLAB Wolfram TeX \[\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 3.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(1 - k\right)}}{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
(if (<= k 3.8e-22)
(/ (sqrt (* PI (* 2.0 n))) (sqrt k))
(sqrt (/ (pow (* n (* PI 2.0)) (- 1.0 k)) 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 tmp;
if (k <= 3.8e-22) {
tmp = sqrt((((double) M_PI) * (2.0 * n))) / sqrt(k);
} else {
tmp = sqrt((pow((n * (((double) M_PI) * 2.0)), (1.0 - k)) / k));
}
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 <= 3.8e-22) {
tmp = Math.sqrt((Math.PI * (2.0 * n))) / Math.sqrt(k);
} else {
tmp = Math.sqrt((Math.pow((n * (Math.PI * 2.0)), (1.0 - k)) / k));
}
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 <= 3.8e-22:
tmp = math.sqrt((math.pi * (2.0 * n))) / math.sqrt(k)
else:
tmp = math.sqrt((math.pow((n * (math.pi * 2.0)), (1.0 - k)) / k))
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 <= 3.8e-22)
tmp = Float64(sqrt(Float64(pi * Float64(2.0 * n))) / sqrt(k));
else
tmp = sqrt(Float64((Float64(n * Float64(pi * 2.0)) ^ Float64(1.0 - k)) / k));
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 <= 3.8e-22)
tmp = sqrt((pi * (2.0 * n))) / sqrt(k);
else
tmp = sqrt((((n * (pi * 2.0)) ^ (1.0 - k)) / k));
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, 3.8e-22], N[(N[Sqrt[N[(Pi * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[k], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[Power[N[(n * N[(Pi * 2.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - k), $MachinePrecision]], $MachinePrecision] / k), $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}
\mathbf{if}\;k \leq 3.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(1 - k\right)}}{k}}\\
\end{array}