(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 (sqrt (* PI (* n 2.0))))) (fma (/ 0.5 (pow t_0 k)) (/ (+ t_0 t_0) (sqrt k)) 0.0)))
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 = sqrt((((double) M_PI) * (n * 2.0)));
return fma((0.5 / pow(t_0, k)), ((t_0 + t_0) / sqrt(k)), 0.0);
}
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 = sqrt(Float64(pi * Float64(n * 2.0))) return fma(Float64(0.5 / (t_0 ^ k)), Float64(Float64(t_0 + t_0) / sqrt(k)), 0.0) 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[Sqrt[N[(Pi * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(N[(0.5 / N[Power[t$95$0, k], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 + t$95$0), $MachinePrecision] / N[Sqrt[k], $MachinePrecision]), $MachinePrecision] + 0.0), $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 := \sqrt{\pi \cdot \left(n \cdot 2\right)}\\
\mathsf{fma}\left(\frac{0.5}{{t_0}^{k}}, \frac{t_0 + t_0}{\sqrt{k}}, 0\right)
\end{array}



Bits error versus k



Bits error versus n
Initial program 0.5
Simplified0.4
Applied egg-rr0.4
Applied egg-rr0.4
Final simplification0.4
herbie shell --seed 2022194
(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))))