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

    \[\leadsto \color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}}\]
  3. Using strategy rm
  4. Applied div-sub_binary640.5

    \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(\frac{1}{2} - \frac{k}{2}\right)}}}{\sqrt{k}}\]
  5. Applied pow-sub_binary640.4

    \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1}{2}\right)}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}}\]
  6. Simplified0.4

    \[\leadsto \frac{\frac{\color{blue}{\sqrt{2 \cdot \left(n \cdot \pi\right)}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}}\]
  7. Simplified0.4

    \[\leadsto \frac{\frac{\sqrt{2 \cdot \left(n \cdot \pi\right)}}{\color{blue}{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}}\]
  8. Using strategy rm
  9. Applied *-un-lft-identity_binary640.4

    \[\leadsto \frac{\frac{\sqrt{2 \cdot \left(n \cdot \pi\right)}}{\color{blue}{1 \cdot {\left(2 \cdot \left(n \cdot \pi\right)\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}}\]
  10. Applied sqrt-prod_binary640.5

    \[\leadsto \frac{\frac{\color{blue}{\sqrt{2} \cdot \sqrt{n \cdot \pi}}}{1 \cdot {\left(2 \cdot \left(n \cdot \pi\right)\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}}\]
  11. Applied times-frac_binary640.5

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

    \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{1}}{\frac{\sqrt{k}}{\frac{\sqrt{n \cdot \pi}}{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{\left(\frac{k}{2}\right)}}}}}\]
  13. Simplified0.4

    \[\leadsto \frac{\frac{\sqrt{2}}{1}}{\color{blue}{\frac{\sqrt{k}}{\frac{\sqrt{n \cdot \pi}}{{\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(\frac{k}{2}\right)}}}}}\]
  14. Using strategy rm
  15. Applied *-un-lft-identity_binary640.4

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

    \[\leadsto \frac{\frac{\sqrt{2}}{1}}{\frac{\sqrt{k}}{\frac{\color{blue}{\sqrt{n} \cdot \sqrt{\pi}}}{1 \cdot {\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(\frac{k}{2}\right)}}}}\]
  17. Applied times-frac_binary640.4

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

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

    \[\leadsto \frac{\frac{\sqrt{2}}{1}}{\frac{\color{blue}{\sqrt{1} \cdot \sqrt{k}}}{\frac{\sqrt{n}}{1} \cdot \frac{\sqrt{\pi}}{{\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(\frac{k}{2}\right)}}}}\]
  20. Applied times-frac_binary640.4

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

    \[\leadsto \color{blue}{\frac{\frac{\frac{\sqrt{2}}{1}}{\frac{\sqrt{1}}{\frac{\sqrt{n}}{1}}}}{\frac{\sqrt{k}}{\frac{\sqrt{\pi}}{{\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(\frac{k}{2}\right)}}}}}\]
  22. Simplified0.4

    \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{n}}}{\frac{\sqrt{k}}{\frac{\sqrt{\pi}}{{\left(n \cdot \left(\pi \cdot 2\right)\right)}^{\left(\frac{k}{2}\right)}}}}\]
  23. Final simplification0.4

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

Reproduce

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