Average Error: 0.5 → 0.5
Time: 12.6s
Precision: 64
\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
\[\left(\frac{1}{\sqrt{k}} \cdot \left({2}^{\left(\frac{1 - k}{2}\right)} \cdot {\pi}^{\left(\frac{1 - k}{2}\right)}\right)\right) \cdot \frac{{n}^{\left(\frac{1}{2}\right)}}{{n}^{\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(\frac{1}{\sqrt{k}} \cdot \left({2}^{\left(\frac{1 - k}{2}\right)} \cdot {\pi}^{\left(\frac{1 - k}{2}\right)}\right)\right) \cdot \frac{{n}^{\left(\frac{1}{2}\right)}}{{n}^{\left(\frac{k}{2}\right)}}
double f(double k, double n) {
        double r112205 = 1.0;
        double r112206 = k;
        double r112207 = sqrt(r112206);
        double r112208 = r112205 / r112207;
        double r112209 = 2.0;
        double r112210 = atan2(1.0, 0.0);
        double r112211 = r112209 * r112210;
        double r112212 = n;
        double r112213 = r112211 * r112212;
        double r112214 = r112205 - r112206;
        double r112215 = r112214 / r112209;
        double r112216 = pow(r112213, r112215);
        double r112217 = r112208 * r112216;
        return r112217;
}

double f(double k, double n) {
        double r112218 = 1.0;
        double r112219 = k;
        double r112220 = sqrt(r112219);
        double r112221 = r112218 / r112220;
        double r112222 = 2.0;
        double r112223 = r112218 - r112219;
        double r112224 = r112223 / r112222;
        double r112225 = pow(r112222, r112224);
        double r112226 = atan2(1.0, 0.0);
        double r112227 = pow(r112226, r112224);
        double r112228 = r112225 * r112227;
        double r112229 = r112221 * r112228;
        double r112230 = n;
        double r112231 = r112218 / r112222;
        double r112232 = pow(r112230, r112231);
        double r112233 = r112219 / r112222;
        double r112234 = pow(r112230, r112233);
        double r112235 = r112232 / r112234;
        double r112236 = r112229 * r112235;
        return r112236;
}

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 unpow-prod-down0.7

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

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

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

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

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

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

Reproduce

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