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
















Bits error versus k
















Bits error versus n
Results
| Alternative 1 | |
|---|---|
| Error | 0.4 |
| Cost | 20288 |
| Alternative 2 | |
|---|---|
| Error | 0.4 |
| Cost | 20224 |
| Alternative 3 | |
|---|---|
| Error | 0.5 |
| Cost | 19968 |
| Alternative 4 | |
|---|---|
| Error | 0.5 |
| Cost | 13632 |
| Alternative 5 | |
|---|---|
| Error | 0.5 |
| Cost | 13568 |
| Alternative 6 | |
|---|---|
| Error | 1.1 |
| Cost | 13889 |
| Alternative 7 | |
|---|---|
| Error | 1.1 |
| Cost | 13761 |
| Alternative 8 | |
|---|---|
| Error | 1.7 |
| Cost | 13633 |
| Alternative 9 | |
|---|---|
| Error | 1.7 |
| Cost | 13569 |
| Alternative 10 | |
|---|---|
| Error | 11.9 |
| Cost | 7169 |
| Alternative 11 | |
|---|---|
| Error | 11.9 |
| Cost | 7169 |
| Alternative 12 | |
|---|---|
| Error | 40.2 |
| Cost | 385 |
| Alternative 13 | |
|---|---|
| Error | 60.5 |
| Cost | 64 |


Initial program 0.5
rmApplied pow1/2_binary64_11810.5
Applied pow-flip_binary64_11750.5
Simplified0.5
rmApplied div-sub_binary64_11060.5
Applied pow-sub_binary64_11770.4
Simplified0.4
rmApplied add-sqr-sqrt_binary64_11230.4
rmApplied pow2_binary64_11820.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021065
(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))))