Average Error: 0.4 → 0.4
Time: 3.5m
Precision: 64
\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
\[\left(\sqrt{\pi} \cdot \frac{{2}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}\right) \cdot \frac{{n}^{\left(\frac{1 - k}{2}\right)}}{{\pi}^{\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)}
\left(\sqrt{\pi} \cdot \frac{{2}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}\right) \cdot \frac{{n}^{\left(\frac{1 - k}{2}\right)}}{{\pi}^{\left(\frac{k}{2}\right)}}
double f(double k, double n) {
        double r33769059 = 1.0;
        double r33769060 = k;
        double r33769061 = sqrt(r33769060);
        double r33769062 = r33769059 / r33769061;
        double r33769063 = 2.0;
        double r33769064 = atan2(1.0, 0.0);
        double r33769065 = r33769063 * r33769064;
        double r33769066 = n;
        double r33769067 = r33769065 * r33769066;
        double r33769068 = r33769059 - r33769060;
        double r33769069 = r33769068 / r33769063;
        double r33769070 = pow(r33769067, r33769069);
        double r33769071 = r33769062 * r33769070;
        return r33769071;
}

double f(double k, double n) {
        double r33769072 = atan2(1.0, 0.0);
        double r33769073 = sqrt(r33769072);
        double r33769074 = 2.0;
        double r33769075 = 1.0;
        double r33769076 = k;
        double r33769077 = r33769075 - r33769076;
        double r33769078 = r33769077 / r33769074;
        double r33769079 = pow(r33769074, r33769078);
        double r33769080 = sqrt(r33769076);
        double r33769081 = r33769079 / r33769080;
        double r33769082 = r33769073 * r33769081;
        double r33769083 = n;
        double r33769084 = pow(r33769083, r33769078);
        double r33769085 = r33769076 / r33769074;
        double r33769086 = pow(r33769072, r33769085);
        double r33769087 = r33769084 / r33769086;
        double r33769088 = r33769082 * r33769087;
        return r33769088;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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