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










Bits error versus k










Bits error versus n
Results
| Alternative 1 | |
|---|---|
| Accuracy | 0.5 |
| Cost | 1792 |
| Alternative 2 | |
|---|---|
| Accuracy | 0.5 |
| Cost | 1728 |
| Alternative 3 | |
|---|---|
| Accuracy | 0.5 |
| Cost | 1856 |
| Alternative 4 | |
|---|---|
| Accuracy | 0.5 |
| Cost | 2304 |
| Alternative 5 | |
|---|---|
| Accuracy | 0.5 |
| Cost | 1664 |
| Alternative 6 | |
|---|---|
| Accuracy | 0.5 |
| Cost | 2048 |
| Alternative 7 | |
|---|---|
| Accuracy | 22.0 |
| Cost | 4736 |
Initial program 0.5
Simplified0.4
rmApplied unpow-prod-down_binary64_4980.6
rmApplied unpow-prod-down_binary64_4980.6
Applied associate-*l*_binary64_3600.5
rmApplied *-un-lft-identity_binary64_4190.5
Applied sqrt-prod_binary64_4350.5
Applied times-frac_binary64_4250.5
Simplified0.5
rmApplied *-un-lft-identity_binary64_4190.5
Applied sqrt-prod_binary64_4350.5
Applied times-frac_binary64_4250.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2020322
(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))))