Average Error: 0.6 → 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 {\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)}}\]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\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)}}
double f(double k, double n) {
        double r151537 = 1.0;
        double r151538 = k;
        double r151539 = sqrt(r151538);
        double r151540 = r151537 / r151539;
        double r151541 = 2.0;
        double r151542 = atan2(1.0, 0.0);
        double r151543 = r151541 * r151542;
        double r151544 = n;
        double r151545 = r151543 * r151544;
        double r151546 = r151537 - r151538;
        double r151547 = r151546 / r151541;
        double r151548 = pow(r151545, r151547);
        double r151549 = r151540 * r151548;
        return r151549;
}

double f(double k, double n) {
        double r151550 = 1.0;
        double r151551 = 2.0;
        double r151552 = atan2(1.0, 0.0);
        double r151553 = r151551 * r151552;
        double r151554 = n;
        double r151555 = r151553 * r151554;
        double r151556 = r151550 / r151551;
        double r151557 = pow(r151555, r151556);
        double r151558 = r151550 * r151557;
        double r151559 = k;
        double r151560 = sqrt(r151559);
        double r151561 = r151559 / r151551;
        double r151562 = pow(r151555, r151561);
        double r151563 = r151560 * r151562;
        double r151564 = r151558 / r151563;
        return r151564;
}

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

    \[\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.6

    \[\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. Final simplification0.4

    \[\leadsto \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)}}\]

Reproduce

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