Average Error: 0.5 → 0.4
Time: 27.9s
Precision: 64
Internal precision: 1408
\[\frac1{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}\]
\[\frac1{\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)}}\]

Error

Bits error versus k

Bits error versus n

Derivation

  1. Initial program 0.5

    \[\frac1{\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-sub 0.5

    \[\leadsto \frac1{\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-sub 0.4

    \[\leadsto \frac1{\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. Removed slow pow expressions

Runtime

Time bar (total: 27.9s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(FPCore (k n)
  :name "Migdal et al, Equation (51)"
  (* (/ (sqrt k)) (pow (* (* 2 PI) n) (/ (- 1 k) 2))))