Average Error: 0.4 → 0.4
Time: 8.4s
Precision: 64
\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
\[1 \cdot \frac{1}{\frac{1}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - 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)}
1 \cdot \frac{1}{\frac{1}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}}}
double f(double k, double n) {
        double r175248 = 1.0;
        double r175249 = k;
        double r175250 = sqrt(r175249);
        double r175251 = r175248 / r175250;
        double r175252 = 2.0;
        double r175253 = atan2(1.0, 0.0);
        double r175254 = r175252 * r175253;
        double r175255 = n;
        double r175256 = r175254 * r175255;
        double r175257 = r175248 - r175249;
        double r175258 = r175257 / r175252;
        double r175259 = pow(r175256, r175258);
        double r175260 = r175251 * r175259;
        return r175260;
}

double f(double k, double n) {
        double r175261 = 1.0;
        double r175262 = 1.0;
        double r175263 = 2.0;
        double r175264 = atan2(1.0, 0.0);
        double r175265 = r175263 * r175264;
        double r175266 = n;
        double r175267 = r175265 * r175266;
        double r175268 = k;
        double r175269 = r175261 - r175268;
        double r175270 = r175269 / r175263;
        double r175271 = pow(r175267, r175270);
        double r175272 = sqrt(r175268);
        double r175273 = r175271 / r175272;
        double r175274 = r175262 / r175273;
        double r175275 = r175262 / r175274;
        double r175276 = r175261 * r175275;
        return r175276;
}

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

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

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

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

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

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

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

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

Reproduce

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