Average Error: 0.5 → 0.5
Time: 9.4s
Precision: binary64
Cost: 32896
\[\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{{t_0}^{\left(k \cdot -0.5\right)} \cdot \sqrt{t_0}}{\sqrt{k}} \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))))
   (/ (* (pow t_0 (* k -0.5)) (sqrt t_0)) (sqrt k))))
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 (pow(t_0, (k * -0.5)) * sqrt(t_0)) / sqrt(k);
}
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.pow(t_0, (k * -0.5)) * Math.sqrt(t_0)) / Math.sqrt(k);
}
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.pow(t_0, (k * -0.5)) * math.sqrt(t_0)) / math.sqrt(k)
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((t_0 ^ Float64(k * -0.5)) * sqrt(t_0)) / sqrt(k))
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 = ((t_0 ^ (k * -0.5)) * sqrt(t_0)) / sqrt(k);
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[Power[t$95$0, N[(k * -0.5), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[k], $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{{t_0}^{\left(k \cdot -0.5\right)} \cdot \sqrt{t_0}}{\sqrt{k}}
\end{array}

Error

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

    \[\leadsto \color{blue}{\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\mathsf{fma}\left(k, -0.5, 0.5\right)\right)}}{\sqrt{k}}} \]
  3. Applied egg-rr0.5

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

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

Alternatives

Alternative 1
Error0.5
Cost26176
\[\frac{{\left(\sqrt{2 \cdot \left(n \cdot \pi\right)}\right)}^{\left(1 - k\right)}}{\sqrt{k}} \]
Alternative 2
Error0.6
Cost19972
\[\begin{array}{l} \mathbf{if}\;k \leq 1.1011707219099613 \cdot 10^{-48}:\\ \;\;\;\;\frac{1}{\sqrt{k} \cdot {\left(2 \cdot \left(n \cdot \pi\right)\right)}^{-0.5}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{k}{{\left(\pi \cdot \left(n + n\right)\right)}^{\left(1 - k\right)}}\right)}^{-0.5}\\ \end{array} \]
Alternative 3
Error0.5
Cost19968
\[{k}^{-0.5} \cdot {\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(\frac{1 - k}{2}\right)} \]
Alternative 4
Error0.7
Cost19908
\[\begin{array}{l} t_0 := 2 \cdot \left(n \cdot \pi\right)\\ \mathbf{if}\;k \leq 1.1907048836177118 \cdot 10^{-48}:\\ \;\;\;\;\frac{1}{\sqrt{k} \cdot {t_0}^{-0.5}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{{t_0}^{\left(1 - k\right)}}{k}}\\ \end{array} \]
Alternative 5
Error17.7
Cost19844
\[\begin{array}{l} \mathbf{if}\;k \leq 2.7 \cdot 10^{+131}:\\ \;\;\;\;\frac{\sqrt{n}}{\sqrt{0.5 \cdot \frac{k}{\pi}}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{\pi \cdot \left(n \cdot 2\right)}{k}\right)}^{3}\right)}^{0.16666666666666666}\\ \end{array} \]
Alternative 6
Error20.9
Cost19780
\[\begin{array}{l} \mathbf{if}\;k \leq 2.4 \cdot 10^{+91}:\\ \;\;\;\;\frac{\sqrt{n}}{\sqrt{0.5 \cdot \frac{k}{\pi}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(\left(n + n\right) \cdot \frac{\pi}{k}\right)}^{1.5}}\\ \end{array} \]
Alternative 7
Error22.1
Cost19584
\[\frac{\sqrt{n}}{\sqrt{0.5 \cdot \frac{k}{\pi}}} \]
Alternative 8
Error32.3
Cost13248
\[{\left(\frac{k}{\pi \cdot \left(n \cdot 2\right)}\right)}^{-0.5} \]
Alternative 9
Error33.0
Cost13184
\[\sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)} \]
Alternative 10
Error32.9
Cost13184
\[\sqrt{2 \cdot \frac{\pi}{\frac{k}{n}}} \]

Error

Reproduce

herbie shell --seed 2022221 
(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))))