\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 := n \cdot \left(2 \cdot \pi\right)\\
\left(\sqrt{\frac{1}{k}} \cdot {t_0}^{\left(k \cdot -0.5\right)}\right) \cdot {t_0}^{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 (let* ((t_0 (* n (* 2.0 PI)))) (* (* (sqrt (/ 1.0 k)) (pow t_0 (* k -0.5))) (pow t_0 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 t_0 = n * (2.0 * ((double) M_PI));
return (sqrt(1.0 / k) * pow(t_0, (k * -0.5))) * pow(t_0, 0.5);
}



Bits error versus k



Bits error versus n
Results
Initial program 0.5
Simplified0.4
Taylor expanded in n around 0 3.5
Simplified0.5
Applied fma-udef_binary640.5
Applied unpow-prod-up_binary640.4
Applied associate-*r*_binary640.4
Final simplification0.4
herbie shell --seed 2022093
(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))))