Average Error: 0.5 → 0.4
Time: 11.9s
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 r173984 = 1.0;
        double r173985 = k;
        double r173986 = sqrt(r173985);
        double r173987 = r173984 / r173986;
        double r173988 = 2.0;
        double r173989 = atan2(1.0, 0.0);
        double r173990 = r173988 * r173989;
        double r173991 = n;
        double r173992 = r173990 * r173991;
        double r173993 = r173984 - r173985;
        double r173994 = r173993 / r173988;
        double r173995 = pow(r173992, r173994);
        double r173996 = r173987 * r173995;
        return r173996;
}

double f(double k, double n) {
        double r173997 = 1.0;
        double r173998 = k;
        double r173999 = sqrt(r173998);
        double r174000 = 2.0;
        double r174001 = atan2(1.0, 0.0);
        double r174002 = r174000 * r174001;
        double r174003 = n;
        double r174004 = r174002 * r174003;
        double r174005 = r173998 / r174000;
        double r174006 = pow(r174004, r174005);
        double r174007 = r173999 * r174006;
        double r174008 = r173997 / r174000;
        double r174009 = pow(r174004, r174008);
        double r174010 = r174007 / r174009;
        double r174011 = r173997 / r174010;
        return r174011;
}

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))))