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



Bits error versus k



Bits error versus n
Results
Initial program 0.5
Simplified0.5
Taylor expanded around 0 3.4
Simplified0.5
rmApplied pow-sub_binary64_8360.4
Applied associate-*r/_binary64_7020.4
Simplified0.4
rmApplied sqrt-div_binary64_7770.5
Applied associate-*l/_binary64_7030.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021032
(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))))