(FPCore (k n) :precision binary64 (* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
(FPCore (k n) :precision binary64 (/ (sqrt (* (* n PI) (* 2.0 (pow (pow (* (* n PI) 2.0) k) -1.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) {
return sqrt(((n * ((double) M_PI)) * (2.0 * pow(pow(((n * ((double) M_PI)) * 2.0), k), -1.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) {
return Math.sqrt(((n * Math.PI) * (2.0 * Math.pow(Math.pow(((n * Math.PI) * 2.0), k), -1.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): return math.sqrt(((n * math.pi) * (2.0 * math.pow(math.pow(((n * math.pi) * 2.0), k), -1.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) return Float64(sqrt(Float64(Float64(n * pi) * Float64(2.0 * ((Float64(Float64(n * pi) * 2.0) ^ k) ^ -1.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) tmp = sqrt(((n * pi) * (2.0 * ((((n * pi) * 2.0) ^ k) ^ -1.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_] := N[(N[Sqrt[N[(N[(n * Pi), $MachinePrecision] * N[(2.0 * N[Power[N[Power[N[(N[(n * Pi), $MachinePrecision] * 2.0), $MachinePrecision], k], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[k], $MachinePrecision]), $MachinePrecision]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\frac{\sqrt{\left(n \cdot \pi\right) \cdot \left(2 \cdot {\left({\left(\left(n \cdot \pi\right) \cdot 2\right)}^{k}\right)}^{-1}\right)}}{\sqrt{k}}



Bits error versus k



Bits error versus n
Results
Initial program 0.5
Simplified0.4
Applied egg-rr0.4
Taylor expanded in k around inf 0.5
Simplified0.5
Applied egg-rr0.4
Final simplification0.4
herbie shell --seed 2022134
(FPCore (k n)
:name "Migdal et al, Equation (51)"
:precision binary64
(* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))