Average Error: 0.5 → 0.6
Time: 13.0s
Precision: 64
\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
\[\frac{1}{\sqrt{k}} \cdot \left({2}^{\left(\frac{1 - k}{2}\right)} \cdot \left({\pi}^{\left(\frac{1 - k}{2}\right)} \cdot {n}^{\left(\frac{1 - k}{2}\right)}\right)\right)\]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\frac{1}{\sqrt{k}} \cdot \left({2}^{\left(\frac{1 - k}{2}\right)} \cdot \left({\pi}^{\left(\frac{1 - k}{2}\right)} \cdot {n}^{\left(\frac{1 - k}{2}\right)}\right)\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, ((1.0 - k) / 2.0)) * (pow(((double) M_PI), ((1.0 - k) / 2.0)) * pow(n, ((1.0 - k) / 2.0)))));
}

Error

Bits error versus k

Bits error versus n

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
  2. Using strategy rm
  3. Applied unpow-prod-down0.7

    \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{\left({\left(2 \cdot \pi\right)}^{\left(\frac{1 - k}{2}\right)} \cdot {n}^{\left(\frac{1 - k}{2}\right)}\right)}\]
  4. Applied associate-*r*0.7

    \[\leadsto \color{blue}{\left(\frac{1}{\sqrt{k}} \cdot {\left(2 \cdot \pi\right)}^{\left(\frac{1 - k}{2}\right)}\right) \cdot {n}^{\left(\frac{1 - k}{2}\right)}}\]
  5. Using strategy rm
  6. Applied unpow-prod-down0.6

    \[\leadsto \left(\frac{1}{\sqrt{k}} \cdot \color{blue}{\left({2}^{\left(\frac{1 - k}{2}\right)} \cdot {\pi}^{\left(\frac{1 - k}{2}\right)}\right)}\right) \cdot {n}^{\left(\frac{1 - k}{2}\right)}\]
  7. Using strategy rm
  8. Applied associate-*l*0.6

    \[\leadsto \color{blue}{\frac{1}{\sqrt{k}} \cdot \left(\left({2}^{\left(\frac{1 - k}{2}\right)} \cdot {\pi}^{\left(\frac{1 - k}{2}\right)}\right) \cdot {n}^{\left(\frac{1 - k}{2}\right)}\right)}\]
  9. Using strategy rm
  10. Applied associate-*l*0.6

    \[\leadsto \frac{1}{\sqrt{k}} \cdot \color{blue}{\left({2}^{\left(\frac{1 - k}{2}\right)} \cdot \left({\pi}^{\left(\frac{1 - k}{2}\right)} \cdot {n}^{\left(\frac{1 - k}{2}\right)}\right)\right)}\]
  11. Final simplification0.6

    \[\leadsto \frac{1}{\sqrt{k}} \cdot \left({2}^{\left(\frac{1 - k}{2}\right)} \cdot \left({\pi}^{\left(\frac{1 - k}{2}\right)} \cdot {n}^{\left(\frac{1 - k}{2}\right)}\right)\right)\]

Reproduce

herbie shell --seed 2020078 +o rules:numerics
(FPCore (k n)
  :name "Migdal et al, Equation (51)"
  :precision binary64
  (* (/ 1 (sqrt k)) (pow (* (* 2 PI) n) (/ (- 1 k) 2))))