Average Error: 0.5 → 0.4
Time: 11.8s
Precision: 64
\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
\[\frac{1}{\frac{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1}{2}\right)}}}\]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\frac{1}{\frac{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1}{2}\right)}}}
double f(double k, double n) {
        double r173743 = 1.0;
        double r173744 = k;
        double r173745 = sqrt(r173744);
        double r173746 = r173743 / r173745;
        double r173747 = 2.0;
        double r173748 = atan2(1.0, 0.0);
        double r173749 = r173747 * r173748;
        double r173750 = n;
        double r173751 = r173749 * r173750;
        double r173752 = r173743 - r173744;
        double r173753 = r173752 / r173747;
        double r173754 = pow(r173751, r173753);
        double r173755 = r173746 * r173754;
        return r173755;
}

double f(double k, double n) {
        double r173756 = 1.0;
        double r173757 = k;
        double r173758 = sqrt(r173757);
        double r173759 = 2.0;
        double r173760 = atan2(1.0, 0.0);
        double r173761 = r173759 * r173760;
        double r173762 = n;
        double r173763 = r173761 * r173762;
        double r173764 = r173757 / r173759;
        double r173765 = pow(r173763, r173764);
        double r173766 = r173758 * r173765;
        double r173767 = r173756 / r173759;
        double r173768 = pow(r173763, r173767);
        double r173769 = r173766 / r173768;
        double r173770 = r173756 / r173769;
        return r173770;
}

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 div-sub0.5

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

    \[\leadsto \frac{1}{\sqrt{k}} \cdot \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)}}}\]
  5. Applied frac-times0.4

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

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

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

Reproduce

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