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



Bits error versus k



Bits error versus n
Results
Initial program 0.4
rmApplied sqr-pow0.5
Applied associate-*r*0.5
Final simplification0.5
herbie shell --seed 2020058 +o rules:numerics
(FPCore (k n)
:name "Migdal et al, Equation (51)"
:precision binary64
(* (/ 1 (sqrt k)) (pow (* (* 2 PI) n) (/ (- 1 k) 2))))