Average Error: 0.5 → 0.4
Time: 11.3s
Precision: 64
\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
\[\frac{1 \cdot \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}}\]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\frac{1 \cdot \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}}
double f(double k, double n) {
        double r138094 = 1.0;
        double r138095 = k;
        double r138096 = sqrt(r138095);
        double r138097 = r138094 / r138096;
        double r138098 = 2.0;
        double r138099 = atan2(1.0, 0.0);
        double r138100 = r138098 * r138099;
        double r138101 = n;
        double r138102 = r138100 * r138101;
        double r138103 = r138094 - r138095;
        double r138104 = r138103 / r138098;
        double r138105 = pow(r138102, r138104);
        double r138106 = r138097 * r138105;
        return r138106;
}

double f(double k, double n) {
        double r138107 = 1.0;
        double r138108 = 2.0;
        double r138109 = atan2(1.0, 0.0);
        double r138110 = r138108 * r138109;
        double r138111 = n;
        double r138112 = r138110 * r138111;
        double r138113 = r138107 / r138108;
        double r138114 = pow(r138112, r138113);
        double r138115 = k;
        double r138116 = r138115 / r138108;
        double r138117 = pow(r138112, r138116);
        double r138118 = r138114 / r138117;
        double r138119 = r138107 * r138118;
        double r138120 = sqrt(r138115);
        double r138121 = r138119 / r138120;
        return r138121;
}

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

    \[\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 times-frac0.5

    \[\leadsto \color{blue}{\frac{1}{\sqrt{k}} \cdot \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)}}}\]
  8. Using strategy rm
  9. Applied associate-*l/0.4

    \[\leadsto \color{blue}{\frac{1 \cdot \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}}}\]
  10. Final simplification0.4

    \[\leadsto \frac{1 \cdot \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}}\]

Reproduce

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