?

Average Error: 0.78% → 0.61%
Time: 12.7s
Precision: binary64
Cost: 32960

?

\[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
\[\begin{array}{l} t_0 := n \cdot \left(2 \cdot \pi\right)\\ \frac{\sqrt{t_0}}{{t_0}^{\left(0.5 \cdot k\right)}} \cdot {k}^{-0.5} \end{array} \]
(FPCore (k n)
 :precision binary64
 (* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
(FPCore (k n)
 :precision binary64
 (let* ((t_0 (* n (* 2.0 PI))))
   (* (/ (sqrt t_0) (pow t_0 (* 0.5 k))) (pow k -0.5))))
double code(double k, double n) {
	return (1.0 / sqrt(k)) * pow(((2.0 * ((double) M_PI)) * n), ((1.0 - k) / 2.0));
}
double code(double k, double n) {
	double t_0 = n * (2.0 * ((double) M_PI));
	return (sqrt(t_0) / pow(t_0, (0.5 * k))) * pow(k, -0.5);
}
public static double code(double k, double n) {
	return (1.0 / Math.sqrt(k)) * Math.pow(((2.0 * Math.PI) * n), ((1.0 - k) / 2.0));
}
public static double code(double k, double n) {
	double t_0 = n * (2.0 * Math.PI);
	return (Math.sqrt(t_0) / Math.pow(t_0, (0.5 * k))) * Math.pow(k, -0.5);
}
def code(k, n):
	return (1.0 / math.sqrt(k)) * math.pow(((2.0 * math.pi) * n), ((1.0 - k) / 2.0))
def code(k, n):
	t_0 = n * (2.0 * math.pi)
	return (math.sqrt(t_0) / math.pow(t_0, (0.5 * k))) * math.pow(k, -0.5)
function code(k, n)
	return Float64(Float64(1.0 / sqrt(k)) * (Float64(Float64(2.0 * pi) * n) ^ Float64(Float64(1.0 - k) / 2.0)))
end
function code(k, n)
	t_0 = Float64(n * Float64(2.0 * pi))
	return Float64(Float64(sqrt(t_0) / (t_0 ^ Float64(0.5 * k))) * (k ^ -0.5))
end
function tmp = code(k, n)
	tmp = (1.0 / sqrt(k)) * (((2.0 * pi) * n) ^ ((1.0 - k) / 2.0));
end
function tmp = code(k, n)
	t_0 = n * (2.0 * pi);
	tmp = (sqrt(t_0) / (t_0 ^ (0.5 * k))) * (k ^ -0.5);
end
code[k_, n_] := N[(N[(1.0 / N[Sqrt[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 * Pi), $MachinePrecision] * n), $MachinePrecision], N[(N[(1.0 - k), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[k_, n_] := Block[{t$95$0 = N[(n * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[Sqrt[t$95$0], $MachinePrecision] / N[Power[t$95$0, N[(0.5 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[k, -0.5], $MachinePrecision]), $MachinePrecision]]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\begin{array}{l}
t_0 := n \cdot \left(2 \cdot \pi\right)\\
\frac{\sqrt{t_0}}{{t_0}^{\left(0.5 \cdot k\right)}} \cdot {k}^{-0.5}
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.78

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Applied egg-rr0.61

    \[\leadsto \color{blue}{\frac{\sqrt{2 \cdot \left(\pi \cdot n\right)} \cdot {k}^{-0.5}}{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(k \cdot 0.5\right)}}} \]
  3. Simplified0.61

    \[\leadsto \color{blue}{\frac{\sqrt{n \cdot \left(2 \cdot \pi\right)}}{{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(0.5 \cdot k\right)}} \cdot {k}^{-0.5}} \]
    Proof

    [Start]0.61

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

    associate-/l* [=>]0.67

    \[ \color{blue}{\frac{\sqrt{2 \cdot \left(\pi \cdot n\right)}}{\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(k \cdot 0.5\right)}}{{k}^{-0.5}}}} \]

    associate-/r/ [=>]0.61

    \[ \color{blue}{\frac{\sqrt{2 \cdot \left(\pi \cdot n\right)}}{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(k \cdot 0.5\right)}} \cdot {k}^{-0.5}} \]

    associate-*r* [=>]0.61

    \[ \frac{\sqrt{\color{blue}{\left(2 \cdot \pi\right) \cdot n}}}{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(k \cdot 0.5\right)}} \cdot {k}^{-0.5} \]

    *-commutative [=>]0.61

    \[ \frac{\sqrt{\color{blue}{n \cdot \left(2 \cdot \pi\right)}}}{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(k \cdot 0.5\right)}} \cdot {k}^{-0.5} \]

    associate-*r* [=>]0.61

    \[ \frac{\sqrt{n \cdot \left(2 \cdot \pi\right)}}{{\color{blue}{\left(\left(2 \cdot \pi\right) \cdot n\right)}}^{\left(k \cdot 0.5\right)}} \cdot {k}^{-0.5} \]

    *-commutative [=>]0.61

    \[ \frac{\sqrt{n \cdot \left(2 \cdot \pi\right)}}{{\color{blue}{\left(n \cdot \left(2 \cdot \pi\right)\right)}}^{\left(k \cdot 0.5\right)}} \cdot {k}^{-0.5} \]

    *-commutative [=>]0.61

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

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

Alternatives

Alternative 1
Error0.61%
Cost32896
\[\begin{array}{l} t_0 := \pi \cdot \left(n \cdot 2\right)\\ \frac{\sqrt{t_0} \cdot {t_0}^{\left(k \cdot -0.5\right)}}{\sqrt{k}} \end{array} \]
Alternative 2
Error0.61%
Cost32896
\[\begin{array}{l} t_0 := \pi \cdot \left(n \cdot 2\right)\\ \frac{\frac{\sqrt{t_0}}{{t_0}^{\left(0.5 \cdot k\right)}}}{\sqrt{k}} \end{array} \]
Alternative 3
Error0.77%
Cost20032
\[\frac{1}{\sqrt{k} \cdot {\left(2 \cdot \left(n \cdot \pi\right)\right)}^{\left(-0.5 + \frac{k}{2}\right)}} \]
Alternative 4
Error0.71%
Cost19968
\[{k}^{-0.5} \cdot {\left(\pi \cdot \left(n \cdot 2\right)\right)}^{\left(0.5 + k \cdot -0.5\right)} \]
Alternative 5
Error1.21%
Cost19908
\[\begin{array}{l} \mathbf{if}\;k \leq 2.15 \cdot 10^{-66}:\\ \;\;\;\;\frac{\sqrt{n \cdot 2}}{\sqrt{\frac{k}{\pi}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{{\left(\pi \cdot \left(n \cdot 2\right)\right)}^{\left(1 - k\right)}}{k}}\\ \end{array} \]
Alternative 6
Error0.71%
Cost19904
\[\frac{{\left(\pi \cdot \left(n \cdot 2\right)\right)}^{\left(0.5 - \frac{k}{2}\right)}}{\sqrt{k}} \]
Alternative 7
Error33.43%
Cost19844
\[\begin{array}{l} \mathbf{if}\;k \leq 2 \cdot 10^{+119}:\\ \;\;\;\;\frac{\sqrt{n \cdot 2}}{\sqrt{\frac{k}{\pi}}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(2 \cdot \left(n \cdot \frac{\pi}{k}\right)\right)}^{1.5}\right)}^{0.3333333333333333}\\ \end{array} \]
Alternative 8
Error33.43%
Cost19780
\[\begin{array}{l} \mathbf{if}\;k \leq 2 \cdot 10^{+95}:\\ \;\;\;\;\frac{\sqrt{n \cdot 2}}{\sqrt{\frac{k}{\pi}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(2 \cdot \left(n \cdot \frac{\pi}{k}\right)\right)}^{1.5}}\\ \end{array} \]
Alternative 9
Error33.43%
Cost19780
\[\begin{array}{l} \mathbf{if}\;k \leq 2 \cdot 10^{+119}:\\ \;\;\;\;\frac{\sqrt{n \cdot 2}}{\sqrt{\frac{k}{\pi}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(\pi \cdot \left(2 \cdot \frac{n}{k}\right)\right)}^{1.5}}\\ \end{array} \]
Alternative 10
Error35.16%
Cost19584
\[\sqrt{n} \cdot \sqrt{\pi \cdot \frac{2}{k}} \]
Alternative 11
Error35.07%
Cost19584
\[\sqrt{n \cdot 2} \cdot \sqrt{\frac{\pi}{k}} \]
Alternative 12
Error35.02%
Cost19584
\[\frac{\sqrt{n \cdot 2}}{\sqrt{\frac{k}{\pi}}} \]
Alternative 13
Error49.84%
Cost13312
\[\frac{1}{\sqrt{k \cdot \frac{0.5}{n \cdot \pi}}} \]
Alternative 14
Error49.82%
Cost13312
\[\frac{1}{\sqrt{\frac{k}{\pi \cdot \left(n \cdot 2\right)}}} \]
Alternative 15
Error50.61%
Cost13184
\[\sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)} \]
Alternative 16
Error50.57%
Cost13184
\[\sqrt{2 \cdot \frac{n}{\frac{k}{\pi}}} \]

Error

Reproduce?

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