Migdal et al, Equation (51)

Percentage Accurate: 99.5% → 99.4%
Time: 22.4s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \end{array} \]
(FPCore (k n)
 :precision binary64
 (* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
double code(double k, double n) {
	return (1.0 / sqrt(k)) * pow(((2.0 * ((double) M_PI)) * n), ((1.0 - k) / 2.0));
}
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));
}
def code(k, n):
	return (1.0 / math.sqrt(k)) * math.pow(((2.0 * math.pi) * n), ((1.0 - k) / 2.0))
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 tmp = code(k, n)
	tmp = (1.0 / sqrt(k)) * (((2.0 * pi) * n) ^ ((1.0 - k) / 2.0));
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]
\begin{array}{l}

\\
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 9 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \end{array} \]
(FPCore (k n)
 :precision binary64
 (* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
double code(double k, double n) {
	return (1.0 / sqrt(k)) * pow(((2.0 * ((double) M_PI)) * n), ((1.0 - k) / 2.0));
}
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));
}
def code(k, n):
	return (1.0 / math.sqrt(k)) * math.pow(((2.0 * math.pi) * n), ((1.0 - k) / 2.0))
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 tmp = code(k, n)
	tmp = (1.0 / sqrt(k)) * (((2.0 * pi) * n) ^ ((1.0 - k) / 2.0));
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]
\begin{array}{l}

\\
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
\end{array}

Alternative 1: 99.4% accurate, 0.7× speedup?

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

\\
\sqrt{\frac{2 \cdot n}{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}} \cdot \sqrt{\frac{\pi}{k}}
\end{array}
Derivation
  1. Initial program 99.5%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/99.5%

      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
    2. *-un-lft-identity99.5%

      \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
    3. unpow-prod-down72.7%

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

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

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

      \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
    7. pow-div99.7%

      \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
    8. pow1/299.7%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
    9. associate-/l/99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
    10. *-commutative99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    11. associate-*l*99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    12. div-inv99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
    13. metadata-eval99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
  4. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  6. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  7. Step-by-step derivation
    1. *-un-lft-identity99.7%

      \[\leadsto \color{blue}{1 \cdot \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    2. *-commutative99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}} \cdot 1} \]
    3. sqrt-unprod99.7%

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

      \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \cdot 1 \]
  8. Applied egg-rr90.7%

    \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}} \cdot 1} \]
  9. Step-by-step derivation
    1. *-rgt-identity90.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    2. times-frac90.7%

      \[\leadsto \sqrt{\color{blue}{\frac{\pi}{k} \cdot \frac{2 \cdot n}{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    3. *-commutative90.7%

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

      \[\leadsto \sqrt{\frac{\pi}{k} \cdot \frac{2 \cdot n}{{\color{blue}{\left(2 \cdot \left(n \cdot \pi\right)\right)}}^{k}}} \]
  10. Simplified90.7%

    \[\leadsto \color{blue}{\sqrt{\frac{\pi}{k} \cdot \frac{2 \cdot n}{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}}} \]
  11. Step-by-step derivation
    1. *-commutative90.7%

      \[\leadsto \sqrt{\color{blue}{\frac{2 \cdot n}{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}} \cdot \frac{\pi}{k}}} \]
    2. sqrt-prod99.7%

      \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot n}{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}} \cdot \sqrt{\frac{\pi}{k}}} \]
    3. associate-*r*99.7%

      \[\leadsto \sqrt{\frac{2 \cdot n}{{\color{blue}{\left(\left(2 \cdot n\right) \cdot \pi\right)}}^{k}}} \cdot \sqrt{\frac{\pi}{k}} \]
    4. *-commutative99.7%

      \[\leadsto \sqrt{\frac{2 \cdot n}{{\color{blue}{\left(\pi \cdot \left(2 \cdot n\right)\right)}}^{k}}} \cdot \sqrt{\frac{\pi}{k}} \]
    5. *-commutative99.7%

      \[\leadsto \sqrt{\frac{2 \cdot n}{{\color{blue}{\left(\left(2 \cdot n\right) \cdot \pi\right)}}^{k}}} \cdot \sqrt{\frac{\pi}{k}} \]
    6. associate-*r*99.7%

      \[\leadsto \sqrt{\frac{2 \cdot n}{{\color{blue}{\left(2 \cdot \left(n \cdot \pi\right)\right)}}^{k}}} \cdot \sqrt{\frac{\pi}{k}} \]
    7. *-commutative99.7%

      \[\leadsto \sqrt{\frac{2 \cdot n}{{\left(2 \cdot \color{blue}{\left(\pi \cdot n\right)}\right)}^{k}}} \cdot \sqrt{\frac{\pi}{k}} \]
  12. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\sqrt{\frac{2 \cdot n}{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{k}}} \cdot \sqrt{\frac{\pi}{k}}} \]
  13. Final simplification99.7%

    \[\leadsto \sqrt{\frac{2 \cdot n}{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}} \cdot \sqrt{\frac{\pi}{k}} \]
  14. Add Preprocessing

Alternative 2: 99.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 2.45 \cdot 10^{-45}:\\ \;\;\;\;\sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(1 - k\right)}}{k}}\\ \end{array} \end{array} \]
(FPCore (k n)
 :precision binary64
 (if (<= k 2.45e-45)
   (* (sqrt (/ PI k)) (sqrt (* 2.0 n)))
   (sqrt (/ (pow (* n (* 2.0 PI)) (- 1.0 k)) k))))
double code(double k, double n) {
	double tmp;
	if (k <= 2.45e-45) {
		tmp = sqrt((((double) M_PI) / k)) * sqrt((2.0 * n));
	} else {
		tmp = sqrt((pow((n * (2.0 * ((double) M_PI))), (1.0 - k)) / k));
	}
	return tmp;
}
public static double code(double k, double n) {
	double tmp;
	if (k <= 2.45e-45) {
		tmp = Math.sqrt((Math.PI / k)) * Math.sqrt((2.0 * n));
	} else {
		tmp = Math.sqrt((Math.pow((n * (2.0 * Math.PI)), (1.0 - k)) / k));
	}
	return tmp;
}
def code(k, n):
	tmp = 0
	if k <= 2.45e-45:
		tmp = math.sqrt((math.pi / k)) * math.sqrt((2.0 * n))
	else:
		tmp = math.sqrt((math.pow((n * (2.0 * math.pi)), (1.0 - k)) / k))
	return tmp
function code(k, n)
	tmp = 0.0
	if (k <= 2.45e-45)
		tmp = Float64(sqrt(Float64(pi / k)) * sqrt(Float64(2.0 * n)));
	else
		tmp = sqrt(Float64((Float64(n * Float64(2.0 * pi)) ^ Float64(1.0 - k)) / k));
	end
	return tmp
end
function tmp_2 = code(k, n)
	tmp = 0.0;
	if (k <= 2.45e-45)
		tmp = sqrt((pi / k)) * sqrt((2.0 * n));
	else
		tmp = sqrt((((n * (2.0 * pi)) ^ (1.0 - k)) / k));
	end
	tmp_2 = tmp;
end
code[k_, n_] := If[LessEqual[k, 2.45e-45], N[(N[Sqrt[N[(Pi / k), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[Power[N[(n * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision], N[(1.0 - k), $MachinePrecision]], $MachinePrecision] / k), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.45 \cdot 10^{-45}:\\
\;\;\;\;\sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(1 - k\right)}}{k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.4499999999999999e-45

    1. Initial program 99.3%

      \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
      2. *-un-lft-identity99.4%

        \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
      3. unpow-prod-down98.9%

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

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

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

        \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
      7. pow-div99.4%

        \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
      8. pow1/299.4%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
      9. associate-/l/99.4%

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

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
      11. associate-*l*99.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
      12. div-inv99.4%

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

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
    4. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.4%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    6. Simplified99.4%

      \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    7. Step-by-step derivation
      1. sqrt-unprod99.4%

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

        \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    8. Applied egg-rr77.5%

      \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    9. Taylor expanded in k around 0 77.5%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \frac{n \cdot \pi}{k}}} \]
    10. Step-by-step derivation
      1. associate-/l*77.5%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \frac{\pi}{k}\right)}} \]
    11. Simplified77.5%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}} \]
    12. Step-by-step derivation
      1. associate-*r*77.5%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \frac{\pi}{k}}} \]
      2. sqrt-prod99.5%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{\frac{\pi}{k}}} \]
      3. *-commutative99.5%

        \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \cdot \sqrt{\frac{\pi}{k}} \]
    13. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{\frac{\pi}{k}}} \]

    if 2.4499999999999999e-45 < k

    1. Initial program 99.7%

      \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt99.6%

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

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\sqrt{k}} \cdot \frac{1}{\sqrt{k}}}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
      3. frac-times99.6%

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

        \[\leadsto \sqrt{\frac{\color{blue}{1}}{\sqrt{k} \cdot \sqrt{k}}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
      5. add-sqr-sqrt99.6%

        \[\leadsto \sqrt{\frac{1}{\color{blue}{k}}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    4. Applied egg-rr99.6%

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

      \[\leadsto \color{blue}{{\left(\frac{1}{k} \cdot {\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(1 - k\right)}\right)}^{0.5}} \]
    6. Step-by-step derivation
      1. unpow1/299.7%

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

        \[\leadsto \sqrt{\color{blue}{\frac{1 \cdot {\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(1 - k\right)}}{k}}} \]
      3. *-lft-identity99.7%

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

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

        \[\leadsto \sqrt{\frac{{\color{blue}{\left(\left(2 \cdot n\right) \cdot \pi\right)}}^{\left(1 - k\right)}}{k}} \]
      6. *-commutative99.7%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(1 - k\right)}}{k}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.45 \cdot 10^{-45}:\\ \;\;\;\;\sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(1 - k\right)}}{k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 1.2 \cdot 10^{+238}:\\ \;\;\;\;\sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(2 \cdot \frac{n}{\frac{k}{\pi}}\right)}^{1.5}}\\ \end{array} \end{array} \]
(FPCore (k n)
 :precision binary64
 (if (<= k 1.2e+238)
   (* (sqrt (/ PI k)) (sqrt (* 2.0 n)))
   (cbrt (pow (* 2.0 (/ n (/ k PI))) 1.5))))
double code(double k, double n) {
	double tmp;
	if (k <= 1.2e+238) {
		tmp = sqrt((((double) M_PI) / k)) * sqrt((2.0 * n));
	} else {
		tmp = cbrt(pow((2.0 * (n / (k / ((double) M_PI)))), 1.5));
	}
	return tmp;
}
public static double code(double k, double n) {
	double tmp;
	if (k <= 1.2e+238) {
		tmp = Math.sqrt((Math.PI / k)) * Math.sqrt((2.0 * n));
	} else {
		tmp = Math.cbrt(Math.pow((2.0 * (n / (k / Math.PI))), 1.5));
	}
	return tmp;
}
function code(k, n)
	tmp = 0.0
	if (k <= 1.2e+238)
		tmp = Float64(sqrt(Float64(pi / k)) * sqrt(Float64(2.0 * n)));
	else
		tmp = cbrt((Float64(2.0 * Float64(n / Float64(k / pi))) ^ 1.5));
	end
	return tmp
end
code[k_, n_] := If[LessEqual[k, 1.2e+238], N[(N[Sqrt[N[(Pi / k), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(2.0 * N[(n / N[(k / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.2 \cdot 10^{+238}:\\
\;\;\;\;\sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n}\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(2 \cdot \frac{n}{\frac{k}{\pi}}\right)}^{1.5}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.2e238

    1. Initial program 99.5%

      \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/99.5%

        \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
      2. *-un-lft-identity99.5%

        \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
      3. unpow-prod-down73.4%

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

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

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

        \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
      7. pow-div99.7%

        \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
      8. pow1/299.7%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
      9. associate-/l/99.7%

        \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
      10. *-commutative99.7%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
      11. associate-*l*99.7%

        \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
      12. div-inv99.7%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
      13. metadata-eval99.7%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
    4. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.7%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    6. Simplified99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    7. Step-by-step derivation
      1. sqrt-unprod99.7%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\color{blue}{\sqrt{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
      2. sqrt-undiv89.7%

        \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    8. Applied egg-rr89.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    9. Taylor expanded in k around 0 43.3%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \frac{n \cdot \pi}{k}}} \]
    10. Step-by-step derivation
      1. associate-/l*43.3%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \frac{\pi}{k}\right)}} \]
    11. Simplified43.3%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}} \]
    12. Step-by-step derivation
      1. associate-*r*43.3%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \frac{\pi}{k}}} \]
      2. sqrt-prod53.3%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{\frac{\pi}{k}}} \]
      3. *-commutative53.3%

        \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \cdot \sqrt{\frac{\pi}{k}} \]
    13. Applied egg-rr53.3%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{\frac{\pi}{k}}} \]

    if 1.2e238 < k

    1. Initial program 100.0%

      \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
      2. *-un-lft-identity100.0%

        \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
      3. unpow-prod-down66.7%

        \[\leadsto \frac{\color{blue}{{\left(2 \cdot \pi\right)}^{\left(\frac{1 - k}{2}\right)} \cdot {n}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
      4. unpow-prod-down100.0%

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

        \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(\frac{1}{2} - \frac{k}{2}\right)}}}{\sqrt{k}} \]
      6. metadata-eval100.0%

        \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
      7. pow-div100.0%

        \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
      8. pow1/2100.0%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
      9. associate-/l/100.0%

        \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
      10. *-commutative100.0%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
      11. associate-*l*100.0%

        \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
      12. div-inv100.0%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
      13. metadata-eval100.0%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/2100.0%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    6. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    7. Step-by-step derivation
      1. sqrt-unprod100.0%

        \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\color{blue}{\sqrt{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
      2. sqrt-undiv100.0%

        \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    8. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    9. Taylor expanded in k around 0 3.1%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \frac{n \cdot \pi}{k}}} \]
    10. Step-by-step derivation
      1. associate-/l*3.1%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \frac{\pi}{k}\right)}} \]
    11. Simplified3.1%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}} \]
    12. Step-by-step derivation
      1. add-cbrt-cube27.0%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)} \cdot \sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}\right) \cdot \sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}}} \]
      2. pow1/327.0%

        \[\leadsto \color{blue}{{\left(\left(\sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)} \cdot \sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}\right) \cdot \sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}\right)}^{0.3333333333333333}} \]
    13. Applied egg-rr27.0%

      \[\leadsto \color{blue}{{\left({\left(n \cdot \left(2 \cdot \frac{\pi}{k}\right)\right)}^{1.5}\right)}^{0.3333333333333333}} \]
    14. Step-by-step derivation
      1. unpow1/327.0%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(n \cdot \left(2 \cdot \frac{\pi}{k}\right)\right)}^{1.5}}} \]
      2. associate-*r*27.0%

        \[\leadsto \sqrt[3]{{\color{blue}{\left(\left(n \cdot 2\right) \cdot \frac{\pi}{k}\right)}}^{1.5}} \]
      3. *-commutative27.0%

        \[\leadsto \sqrt[3]{{\left(\color{blue}{\left(2 \cdot n\right)} \cdot \frac{\pi}{k}\right)}^{1.5}} \]
      4. associate-*l*27.0%

        \[\leadsto \sqrt[3]{{\color{blue}{\left(2 \cdot \left(n \cdot \frac{\pi}{k}\right)\right)}}^{1.5}} \]
      5. associate-/l*27.0%

        \[\leadsto \sqrt[3]{{\left(2 \cdot \color{blue}{\frac{n \cdot \pi}{k}}\right)}^{1.5}} \]
      6. *-commutative27.0%

        \[\leadsto \sqrt[3]{{\left(2 \cdot \frac{\color{blue}{\pi \cdot n}}{k}\right)}^{1.5}} \]
      7. associate-*r/27.0%

        \[\leadsto \sqrt[3]{{\left(2 \cdot \color{blue}{\left(\pi \cdot \frac{n}{k}\right)}\right)}^{1.5}} \]
      8. *-commutative27.0%

        \[\leadsto \sqrt[3]{{\left(2 \cdot \color{blue}{\left(\frac{n}{k} \cdot \pi\right)}\right)}^{1.5}} \]
      9. associate-/r/27.0%

        \[\leadsto \sqrt[3]{{\left(2 \cdot \color{blue}{\frac{n}{\frac{k}{\pi}}}\right)}^{1.5}} \]
    15. Simplified27.0%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(2 \cdot \frac{n}{\frac{k}{\pi}}\right)}^{1.5}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.2 \cdot 10^{+238}:\\ \;\;\;\;\sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(2 \cdot \frac{n}{\frac{k}{\pi}}\right)}^{1.5}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.5% accurate, 1.0× speedup?

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

\\
\frac{{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(0.5 - \frac{k}{2}\right)}}{\sqrt{k}}
\end{array}
Derivation
  1. Initial program 99.5%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Step-by-step derivation
    1. associate-*l/99.5%

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

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

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

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

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

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

Alternative 5: 49.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n} \end{array} \]
(FPCore (k n) :precision binary64 (* (sqrt (/ PI k)) (sqrt (* 2.0 n))))
double code(double k, double n) {
	return sqrt((((double) M_PI) / k)) * sqrt((2.0 * n));
}
public static double code(double k, double n) {
	return Math.sqrt((Math.PI / k)) * Math.sqrt((2.0 * n));
}
def code(k, n):
	return math.sqrt((math.pi / k)) * math.sqrt((2.0 * n))
function code(k, n)
	return Float64(sqrt(Float64(pi / k)) * sqrt(Float64(2.0 * n)))
end
function tmp = code(k, n)
	tmp = sqrt((pi / k)) * sqrt((2.0 * n));
end
code[k_, n_] := N[(N[Sqrt[N[(Pi / k), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n}
\end{array}
Derivation
  1. Initial program 99.5%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/99.5%

      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
    2. *-un-lft-identity99.5%

      \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
    3. unpow-prod-down72.7%

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

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

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

      \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
    7. pow-div99.7%

      \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
    8. pow1/299.7%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
    9. associate-/l/99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
    10. *-commutative99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    11. associate-*l*99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    12. div-inv99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
    13. metadata-eval99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
  4. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  6. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  7. Step-by-step derivation
    1. sqrt-unprod99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\color{blue}{\sqrt{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    2. sqrt-undiv90.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  8. Applied egg-rr90.7%

    \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  9. Taylor expanded in k around 0 39.5%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \frac{n \cdot \pi}{k}}} \]
  10. Step-by-step derivation
    1. associate-/l*39.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \frac{\pi}{k}\right)}} \]
  11. Simplified39.5%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}} \]
  12. Step-by-step derivation
    1. associate-*r*39.5%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \frac{\pi}{k}}} \]
    2. sqrt-prod48.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{\frac{\pi}{k}}} \]
    3. *-commutative48.6%

      \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \cdot \sqrt{\frac{\pi}{k}} \]
  13. Applied egg-rr48.6%

    \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{\frac{\pi}{k}}} \]
  14. Final simplification48.6%

    \[\leadsto \sqrt{\frac{\pi}{k}} \cdot \sqrt{2 \cdot n} \]
  15. Add Preprocessing

Alternative 6: 38.6% accurate, 1.9× speedup?

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

\\
\frac{1}{\sqrt{k \cdot \left(\frac{0.5}{n} \cdot \frac{1}{\pi}\right)}}
\end{array}
Derivation
  1. Initial program 99.5%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/99.5%

      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
    2. *-un-lft-identity99.5%

      \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
    3. unpow-prod-down72.7%

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

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

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

      \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
    7. pow-div99.7%

      \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
    8. pow1/299.7%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
    9. associate-/l/99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
    10. *-commutative99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    11. associate-*l*99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    12. div-inv99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
    13. metadata-eval99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
  4. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  6. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  7. Step-by-step derivation
    1. clear-num99.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}{\sqrt{\pi \cdot \left(2 \cdot n\right)}}}} \]
    2. inv-pow99.7%

      \[\leadsto \color{blue}{{\left(\frac{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}{\sqrt{\pi \cdot \left(2 \cdot n\right)}}\right)}^{-1}} \]
    3. sqrt-unprod99.7%

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

      \[\leadsto {\color{blue}{\left(\sqrt{\frac{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}\right)}}^{-1} \]
  8. Applied egg-rr91.3%

    \[\leadsto \color{blue}{{\left(\sqrt{\frac{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}\right)}^{-1}} \]
  9. Step-by-step derivation
    1. unpow-191.3%

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

      \[\leadsto \frac{1}{\sqrt{\color{blue}{k \cdot \frac{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}}} \]
    3. *-commutative91.2%

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

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

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

      \[\leadsto \frac{1}{\sqrt{k \cdot \frac{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}{\color{blue}{2 \cdot \left(n \cdot \pi\right)}}}} \]
  10. Simplified91.2%

    \[\leadsto \color{blue}{\frac{1}{\sqrt{k \cdot \frac{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}{2 \cdot \left(n \cdot \pi\right)}}}} \]
  11. Taylor expanded in k around 0 40.1%

    \[\leadsto \frac{1}{\sqrt{k \cdot \color{blue}{\frac{0.5}{n \cdot \pi}}}} \]
  12. Step-by-step derivation
    1. associate-/r*40.1%

      \[\leadsto \frac{1}{\sqrt{k \cdot \color{blue}{\frac{\frac{0.5}{n}}{\pi}}}} \]
    2. div-inv40.1%

      \[\leadsto \frac{1}{\sqrt{k \cdot \color{blue}{\left(\frac{0.5}{n} \cdot \frac{1}{\pi}\right)}}} \]
  13. Applied egg-rr40.1%

    \[\leadsto \frac{1}{\sqrt{k \cdot \color{blue}{\left(\frac{0.5}{n} \cdot \frac{1}{\pi}\right)}}} \]
  14. Final simplification40.1%

    \[\leadsto \frac{1}{\sqrt{k \cdot \left(\frac{0.5}{n} \cdot \frac{1}{\pi}\right)}} \]
  15. Add Preprocessing

Alternative 7: 38.7% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \frac{1}{\sqrt{k \cdot \frac{0.5}{n \cdot \pi}}} \end{array} \]
(FPCore (k n) :precision binary64 (/ 1.0 (sqrt (* k (/ 0.5 (* n PI))))))
double code(double k, double n) {
	return 1.0 / sqrt((k * (0.5 / (n * ((double) M_PI)))));
}
public static double code(double k, double n) {
	return 1.0 / Math.sqrt((k * (0.5 / (n * Math.PI))));
}
def code(k, n):
	return 1.0 / math.sqrt((k * (0.5 / (n * math.pi))))
function code(k, n)
	return Float64(1.0 / sqrt(Float64(k * Float64(0.5 / Float64(n * pi)))))
end
function tmp = code(k, n)
	tmp = 1.0 / sqrt((k * (0.5 / (n * pi))));
end
code[k_, n_] := N[(1.0 / N[Sqrt[N[(k * N[(0.5 / N[(n * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{\sqrt{k \cdot \frac{0.5}{n \cdot \pi}}}
\end{array}
Derivation
  1. Initial program 99.5%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/99.5%

      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
    2. *-un-lft-identity99.5%

      \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
    3. unpow-prod-down72.7%

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

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

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

      \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
    7. pow-div99.7%

      \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
    8. pow1/299.7%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
    9. associate-/l/99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
    10. *-commutative99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    11. associate-*l*99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    12. div-inv99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
    13. metadata-eval99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
  4. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  6. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  7. Step-by-step derivation
    1. clear-num99.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}{\sqrt{\pi \cdot \left(2 \cdot n\right)}}}} \]
    2. inv-pow99.7%

      \[\leadsto \color{blue}{{\left(\frac{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}{\sqrt{\pi \cdot \left(2 \cdot n\right)}}\right)}^{-1}} \]
    3. sqrt-unprod99.7%

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

      \[\leadsto {\color{blue}{\left(\sqrt{\frac{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}\right)}}^{-1} \]
  8. Applied egg-rr91.3%

    \[\leadsto \color{blue}{{\left(\sqrt{\frac{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}\right)}^{-1}} \]
  9. Step-by-step derivation
    1. unpow-191.3%

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

      \[\leadsto \frac{1}{\sqrt{\color{blue}{k \cdot \frac{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}}} \]
    3. *-commutative91.2%

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

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

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

      \[\leadsto \frac{1}{\sqrt{k \cdot \frac{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}{\color{blue}{2 \cdot \left(n \cdot \pi\right)}}}} \]
  10. Simplified91.2%

    \[\leadsto \color{blue}{\frac{1}{\sqrt{k \cdot \frac{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}{2 \cdot \left(n \cdot \pi\right)}}}} \]
  11. Taylor expanded in k around 0 40.1%

    \[\leadsto \frac{1}{\sqrt{k \cdot \color{blue}{\frac{0.5}{n \cdot \pi}}}} \]
  12. Final simplification40.1%

    \[\leadsto \frac{1}{\sqrt{k \cdot \frac{0.5}{n \cdot \pi}}} \]
  13. Add Preprocessing

Alternative 8: 38.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \frac{1}{\sqrt{\frac{k}{n} \cdot \frac{0.5}{\pi}}} \end{array} \]
(FPCore (k n) :precision binary64 (/ 1.0 (sqrt (* (/ k n) (/ 0.5 PI)))))
double code(double k, double n) {
	return 1.0 / sqrt(((k / n) * (0.5 / ((double) M_PI))));
}
public static double code(double k, double n) {
	return 1.0 / Math.sqrt(((k / n) * (0.5 / Math.PI)));
}
def code(k, n):
	return 1.0 / math.sqrt(((k / n) * (0.5 / math.pi)))
function code(k, n)
	return Float64(1.0 / sqrt(Float64(Float64(k / n) * Float64(0.5 / pi))))
end
function tmp = code(k, n)
	tmp = 1.0 / sqrt(((k / n) * (0.5 / pi)));
end
code[k_, n_] := N[(1.0 / N[Sqrt[N[(N[(k / n), $MachinePrecision] * N[(0.5 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{\sqrt{\frac{k}{n} \cdot \frac{0.5}{\pi}}}
\end{array}
Derivation
  1. Initial program 99.5%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/99.5%

      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
    2. *-un-lft-identity99.5%

      \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
    3. unpow-prod-down72.7%

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

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

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

      \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
    7. pow-div99.7%

      \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
    8. pow1/299.7%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
    9. associate-/l/99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
    10. *-commutative99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    11. associate-*l*99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    12. div-inv99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
    13. metadata-eval99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
  4. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  6. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  7. Step-by-step derivation
    1. clear-num99.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}{\sqrt{\pi \cdot \left(2 \cdot n\right)}}}} \]
    2. inv-pow99.7%

      \[\leadsto \color{blue}{{\left(\frac{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}{\sqrt{\pi \cdot \left(2 \cdot n\right)}}\right)}^{-1}} \]
    3. sqrt-unprod99.7%

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

      \[\leadsto {\color{blue}{\left(\sqrt{\frac{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}\right)}}^{-1} \]
  8. Applied egg-rr91.3%

    \[\leadsto \color{blue}{{\left(\sqrt{\frac{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}\right)}^{-1}} \]
  9. Step-by-step derivation
    1. unpow-191.3%

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

      \[\leadsto \frac{1}{\sqrt{\color{blue}{k \cdot \frac{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}{\pi \cdot \left(2 \cdot n\right)}}}} \]
    3. *-commutative91.2%

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

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

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

      \[\leadsto \frac{1}{\sqrt{k \cdot \frac{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}{\color{blue}{2 \cdot \left(n \cdot \pi\right)}}}} \]
  10. Simplified91.2%

    \[\leadsto \color{blue}{\frac{1}{\sqrt{k \cdot \frac{{\left(2 \cdot \left(n \cdot \pi\right)\right)}^{k}}{2 \cdot \left(n \cdot \pi\right)}}}} \]
  11. Taylor expanded in k around 0 40.1%

    \[\leadsto \frac{1}{\sqrt{k \cdot \color{blue}{\frac{0.5}{n \cdot \pi}}}} \]
  12. Step-by-step derivation
    1. *-un-lft-identity40.1%

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \sqrt{k \cdot \frac{0.5}{n \cdot \pi}}}} \]
    2. associate-*r/40.1%

      \[\leadsto \frac{1}{1 \cdot \sqrt{\color{blue}{\frac{k \cdot 0.5}{n \cdot \pi}}}} \]
    3. times-frac40.1%

      \[\leadsto \frac{1}{1 \cdot \sqrt{\color{blue}{\frac{k}{n} \cdot \frac{0.5}{\pi}}}} \]
  13. Applied egg-rr40.1%

    \[\leadsto \frac{1}{\color{blue}{1 \cdot \sqrt{\frac{k}{n} \cdot \frac{0.5}{\pi}}}} \]
  14. Step-by-step derivation
    1. *-lft-identity40.1%

      \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{k}{n} \cdot \frac{0.5}{\pi}}}} \]
  15. Simplified40.1%

    \[\leadsto \frac{1}{\color{blue}{\sqrt{\frac{k}{n} \cdot \frac{0.5}{\pi}}}} \]
  16. Final simplification40.1%

    \[\leadsto \frac{1}{\sqrt{\frac{k}{n} \cdot \frac{0.5}{\pi}}} \]
  17. Add Preprocessing

Alternative 9: 38.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)} \end{array} \]
(FPCore (k n) :precision binary64 (sqrt (* 2.0 (* n (/ PI k)))))
double code(double k, double n) {
	return sqrt((2.0 * (n * (((double) M_PI) / k))));
}
public static double code(double k, double n) {
	return Math.sqrt((2.0 * (n * (Math.PI / k))));
}
def code(k, n):
	return math.sqrt((2.0 * (n * (math.pi / k))))
function code(k, n)
	return sqrt(Float64(2.0 * Float64(n * Float64(pi / k))))
end
function tmp = code(k, n)
	tmp = sqrt((2.0 * (n * (pi / k))));
end
code[k_, n_] := N[Sqrt[N[(2.0 * N[(n * N[(Pi / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}
\end{array}
Derivation
  1. Initial program 99.5%

    \[\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/99.5%

      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}{\sqrt{k}}} \]
    2. *-un-lft-identity99.5%

      \[\leadsto \frac{\color{blue}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}}}{\sqrt{k}} \]
    3. unpow-prod-down72.7%

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

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

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

      \[\leadsto \frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\color{blue}{0.5} - \frac{k}{2}\right)}}{\sqrt{k}} \]
    7. pow-div99.7%

      \[\leadsto \frac{\color{blue}{\frac{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{0.5}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}}{\sqrt{k}} \]
    8. pow1/299.7%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(2 \cdot \pi\right) \cdot n}}}{{\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}}{\sqrt{k}} \]
    9. associate-/l/99.7%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(2 \cdot \pi\right) \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}}} \]
    10. *-commutative99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    11. associate-*l*99.7%

      \[\leadsto \frac{\sqrt{\color{blue}{\pi \cdot \left(2 \cdot n\right)}}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{k}{2}\right)}} \]
    12. div-inv99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\color{blue}{\left(k \cdot \frac{1}{2}\right)}}} \]
    13. metadata-eval99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(k \cdot \color{blue}{0.5}\right)}} \]
  4. Applied egg-rr99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot {\left({\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  6. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\sqrt{k} \cdot \sqrt{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  7. Step-by-step derivation
    1. sqrt-unprod99.7%

      \[\leadsto \frac{\sqrt{\pi \cdot \left(2 \cdot n\right)}}{\color{blue}{\sqrt{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
    2. sqrt-undiv90.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  8. Applied egg-rr90.7%

    \[\leadsto \color{blue}{\sqrt{\frac{\pi \cdot \left(2 \cdot n\right)}{k \cdot {\left(\pi \cdot \left(2 \cdot n\right)\right)}^{k}}}} \]
  9. Taylor expanded in k around 0 39.5%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \frac{n \cdot \pi}{k}}} \]
  10. Step-by-step derivation
    1. associate-/l*39.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \frac{\pi}{k}\right)}} \]
  11. Simplified39.5%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \frac{\pi}{k}\right)}} \]
  12. Final simplification39.5%

    \[\leadsto \sqrt{2 \cdot \left(n \cdot \frac{\pi}{k}\right)} \]
  13. Add Preprocessing

Reproduce

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