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

Error

Bits error versus k

Bits error versus n

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. Simplified0.4

    \[\leadsto \color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{k}}} \]
  3. Applied *-un-lft-identity_binary640.4

    \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{\color{blue}{1 \cdot k}}} \]
  4. Applied sqrt-prod_binary640.4

    \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\color{blue}{\sqrt{1} \cdot \sqrt{k}}} \]
  5. Applied unpow-prod-down_binary640.6

    \[\leadsto \frac{\color{blue}{{\left(2 \cdot \pi\right)}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)} \cdot {n}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}}{\sqrt{1} \cdot \sqrt{k}} \]
  6. Applied times-frac_binary640.6

    \[\leadsto \color{blue}{\frac{{\left(2 \cdot \pi\right)}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{1}} \cdot \frac{{n}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{k}}} \]
  7. Simplified0.6

    \[\leadsto \color{blue}{{\left(2 \cdot \pi\right)}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}} \cdot \frac{{n}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{k}} \]
  8. Applied unpow-prod-down_binary640.5

    \[\leadsto \color{blue}{\left({2}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)} \cdot {\pi}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}\right)} \cdot \frac{{n}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{k}} \]
  9. Applied associate-*l*_binary640.5

    \[\leadsto \color{blue}{{2}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)} \cdot \left({\pi}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)} \cdot \frac{{n}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{k}}\right)} \]
  10. Final simplification0.5

    \[\leadsto {2}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)} \cdot \left({\pi}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)} \cdot \frac{{n}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{k}}\right) \]

Reproduce

herbie shell --seed 2022082 
(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))))