Migdal et al, Equation (51)

Percentage Accurate: 99.4% → 99.5%
Time: 20.3s
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.4% 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.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \left(2 \cdot n\right)\\
\frac{\sqrt{t_0}}{\sqrt{k} \cdot {t_0}^{\left(k \cdot 0.5\right)}}
\end{array}
\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. *-commutative99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.05 \cdot 10^{-82}:\\
\;\;\;\;\frac{\sqrt{n \cdot \left(\pi \cdot 2\right)}}{\sqrt{k}}\\

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


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

    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. Step-by-step derivation
      1. add-sqr-sqrt98.9%

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

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

      \[\leadsto \color{blue}{{\left(\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\frac{1 - k}{4}\right)}}{{k}^{0.25}}\right)}^{2}} \]
    4. Taylor expanded in k around 0 66.8%

      \[\leadsto {\color{blue}{\left({\left(2 \cdot \frac{n \cdot \pi}{k}\right)}^{0.25}\right)}}^{2} \]
    5. Step-by-step derivation
      1. associate-*r/66.8%

        \[\leadsto {\left({\color{blue}{\left(\frac{2 \cdot \left(n \cdot \pi\right)}{k}\right)}}^{0.25}\right)}^{2} \]
      2. *-commutative66.8%

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

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

        \[\leadsto {\left({\left(\frac{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
      5. rem-exp-log66.7%

        \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(\pi \cdot 2\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
      6. *-commutative66.7%

        \[\leadsto {\left({\left(\frac{e^{\log \color{blue}{\left(2 \cdot \pi\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
      7. rem-exp-log62.6%

        \[\leadsto {\left({\left(\frac{e^{\log \left(2 \cdot \pi\right)} \cdot \color{blue}{e^{\log n}}}{k}\right)}^{0.25}\right)}^{2} \]
      8. exp-sum62.4%

        \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(2 \cdot \pi\right) + \log n}}}{k}\right)}^{0.25}\right)}^{2} \]
      9. +-commutative62.4%

        \[\leadsto {\left({\left(\frac{e^{\color{blue}{\log n + \log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
      10. exp-sum62.6%

        \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log n} \cdot e^{\log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
      11. rem-exp-log66.7%

        \[\leadsto {\left({\left(\frac{\color{blue}{n} \cdot e^{\log \left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
      12. *-commutative66.7%

        \[\leadsto {\left({\left(\frac{n \cdot e^{\log \color{blue}{\left(\pi \cdot 2\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
      13. rem-exp-log66.8%

        \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(\pi \cdot 2\right)}}{k}\right)}^{0.25}\right)}^{2} \]
      14. *-commutative66.8%

        \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    6. Simplified66.8%

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

        \[\leadsto \color{blue}{{\left(\frac{n \cdot \left(2 \cdot \pi\right)}{k}\right)}^{\left(0.25 \cdot 2\right)}} \]
      2. metadata-eval67.2%

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

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

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

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

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

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

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

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

    if 1.05e-82 < k

    1. Initial program 99.6%

      \[\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. add-sqr-sqrt99.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{{\left(\pi \cdot \left(2 \cdot n\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 1.05 \cdot 10^{-82}:\\ \;\;\;\;\frac{\sqrt{n \cdot \left(\pi \cdot 2\right)}}{\sqrt{k}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{\left(1 - k\right)}}{k}}\\ \end{array} \]

Alternative 3: 99.4% accurate, 1.0× speedup?

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

\\
\frac{{\left(2 \cdot \left(\pi \cdot n\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.6%

      \[\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.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 50.2% accurate, 1.0× speedup?

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

\\
\sqrt{n} \cdot \sqrt{2 \cdot \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. Step-by-step derivation
    1. add-sqr-sqrt99.3%

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

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

    \[\leadsto \color{blue}{{\left(\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\frac{1 - k}{4}\right)}}{{k}^{0.25}}\right)}^{2}} \]
  4. Taylor expanded in k around 0 39.6%

    \[\leadsto {\color{blue}{\left({\left(2 \cdot \frac{n \cdot \pi}{k}\right)}^{0.25}\right)}}^{2} \]
  5. Step-by-step derivation
    1. associate-*r/39.6%

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

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

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

      \[\leadsto {\left({\left(\frac{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    5. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(\pi \cdot 2\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    6. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{e^{\log \color{blue}{\left(2 \cdot \pi\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    7. rem-exp-log37.2%

      \[\leadsto {\left({\left(\frac{e^{\log \left(2 \cdot \pi\right)} \cdot \color{blue}{e^{\log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    8. exp-sum37.0%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(2 \cdot \pi\right) + \log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    9. +-commutative37.0%

      \[\leadsto {\left({\left(\frac{e^{\color{blue}{\log n + \log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    10. exp-sum37.2%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log n} \cdot e^{\log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    11. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{n} \cdot e^{\log \left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    12. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{n \cdot e^{\log \color{blue}{\left(\pi \cdot 2\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    13. rem-exp-log39.6%

      \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(\pi \cdot 2\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    14. *-commutative39.6%

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

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

    \[\leadsto \color{blue}{{\left(e^{0.25 \cdot \left(\log n + \log \left(2 \cdot \frac{\pi}{k}\right)\right)}\right)}^{2}} \]
  8. Simplified39.7%

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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \frac{\pi}{k}} \cdot \sqrt{n}} \]
  10. Applied egg-rr52.4%

    \[\leadsto \color{blue}{\sqrt{2 \cdot \frac{\pi}{k}} \cdot \sqrt{n}} \]
  11. Final simplification52.4%

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

Alternative 5: 50.3% accurate, 1.0× speedup?

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

\\
\frac{\sqrt{n}}{\sqrt{\frac{k}{\pi \cdot 2}}}
\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. add-sqr-sqrt99.3%

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

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

    \[\leadsto \color{blue}{{\left(\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\frac{1 - k}{4}\right)}}{{k}^{0.25}}\right)}^{2}} \]
  4. Taylor expanded in k around 0 39.6%

    \[\leadsto {\color{blue}{\left({\left(2 \cdot \frac{n \cdot \pi}{k}\right)}^{0.25}\right)}}^{2} \]
  5. Step-by-step derivation
    1. associate-*r/39.6%

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

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

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

      \[\leadsto {\left({\left(\frac{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    5. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(\pi \cdot 2\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    6. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{e^{\log \color{blue}{\left(2 \cdot \pi\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    7. rem-exp-log37.2%

      \[\leadsto {\left({\left(\frac{e^{\log \left(2 \cdot \pi\right)} \cdot \color{blue}{e^{\log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    8. exp-sum37.0%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(2 \cdot \pi\right) + \log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    9. +-commutative37.0%

      \[\leadsto {\left({\left(\frac{e^{\color{blue}{\log n + \log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    10. exp-sum37.2%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log n} \cdot e^{\log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    11. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{n} \cdot e^{\log \left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    12. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{n \cdot e^{\log \color{blue}{\left(\pi \cdot 2\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    13. rem-exp-log39.6%

      \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(\pi \cdot 2\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    14. *-commutative39.6%

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\frac{n}{\frac{k}{2 \cdot \pi}}}} \]
    5. sqrt-div52.4%

      \[\leadsto \color{blue}{\frac{\sqrt{n}}{\sqrt{\frac{k}{2 \cdot \pi}}}} \]
  8. Applied egg-rr52.4%

    \[\leadsto \color{blue}{\frac{\sqrt{n}}{\sqrt{\frac{k}{2 \cdot \pi}}}} \]
  9. Final simplification52.4%

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

Alternative 6: 50.2% accurate, 1.0× speedup?

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

\\
\frac{\sqrt{n \cdot \left(\pi \cdot 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. add-sqr-sqrt99.3%

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

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

    \[\leadsto \color{blue}{{\left(\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\frac{1 - k}{4}\right)}}{{k}^{0.25}}\right)}^{2}} \]
  4. Taylor expanded in k around 0 39.6%

    \[\leadsto {\color{blue}{\left({\left(2 \cdot \frac{n \cdot \pi}{k}\right)}^{0.25}\right)}}^{2} \]
  5. Step-by-step derivation
    1. associate-*r/39.6%

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

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

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

      \[\leadsto {\left({\left(\frac{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    5. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(\pi \cdot 2\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    6. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{e^{\log \color{blue}{\left(2 \cdot \pi\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    7. rem-exp-log37.2%

      \[\leadsto {\left({\left(\frac{e^{\log \left(2 \cdot \pi\right)} \cdot \color{blue}{e^{\log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    8. exp-sum37.0%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(2 \cdot \pi\right) + \log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    9. +-commutative37.0%

      \[\leadsto {\left({\left(\frac{e^{\color{blue}{\log n + \log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    10. exp-sum37.2%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log n} \cdot e^{\log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    11. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{n} \cdot e^{\log \left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    12. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{n \cdot e^{\log \color{blue}{\left(\pi \cdot 2\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    13. rem-exp-log39.6%

      \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(\pi \cdot 2\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    14. *-commutative39.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 39.2% accurate, 1.5× speedup?

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

\\
{\left(k \cdot \frac{0.5}{\pi \cdot n}\right)}^{-0.5}
\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. add-sqr-sqrt99.3%

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

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

    \[\leadsto \color{blue}{{\left(\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\frac{1 - k}{4}\right)}}{{k}^{0.25}}\right)}^{2}} \]
  4. Taylor expanded in k around 0 39.6%

    \[\leadsto {\color{blue}{\left({\left(2 \cdot \frac{n \cdot \pi}{k}\right)}^{0.25}\right)}}^{2} \]
  5. Step-by-step derivation
    1. associate-*r/39.6%

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

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

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

      \[\leadsto {\left({\left(\frac{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    5. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(\pi \cdot 2\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    6. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{e^{\log \color{blue}{\left(2 \cdot \pi\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    7. rem-exp-log37.2%

      \[\leadsto {\left({\left(\frac{e^{\log \left(2 \cdot \pi\right)} \cdot \color{blue}{e^{\log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    8. exp-sum37.0%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(2 \cdot \pi\right) + \log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    9. +-commutative37.0%

      \[\leadsto {\left({\left(\frac{e^{\color{blue}{\log n + \log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    10. exp-sum37.2%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log n} \cdot e^{\log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    11. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{n} \cdot e^{\log \left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    12. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{n \cdot e^{\log \color{blue}{\left(\pi \cdot 2\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    13. rem-exp-log39.6%

      \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(\pi \cdot 2\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    14. *-commutative39.6%

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

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

    \[\leadsto \color{blue}{{\left(e^{0.25 \cdot \left(\log n + \log \left(2 \cdot \frac{\pi}{k}\right)\right)}\right)}^{2}} \]
  8. Simplified39.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{n \cdot \left(2 \cdot \pi\right)}}{\sqrt{k}}} \]
    8. clear-num52.4%

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

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

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

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

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

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

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

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

      \[\leadsto {\left(k \cdot \color{blue}{\frac{\frac{1}{2}}{n \cdot \pi}}\right)}^{\left(\frac{-1}{2}\right)} \]
    17. metadata-eval39.8%

      \[\leadsto {\left(k \cdot \frac{\color{blue}{0.5}}{n \cdot \pi}\right)}^{\left(\frac{-1}{2}\right)} \]
    18. *-commutative39.8%

      \[\leadsto {\left(k \cdot \frac{0.5}{\color{blue}{\pi \cdot n}}\right)}^{\left(\frac{-1}{2}\right)} \]
    19. metadata-eval39.8%

      \[\leadsto {\left(k \cdot \frac{0.5}{\pi \cdot n}\right)}^{\color{blue}{-0.5}} \]
  10. Applied egg-rr39.8%

    \[\leadsto \color{blue}{{\left(k \cdot \frac{0.5}{\pi \cdot n}\right)}^{-0.5}} \]
  11. Final simplification39.8%

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

Alternative 8: 38.6% accurate, 1.5× 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. Step-by-step derivation
    1. add-sqr-sqrt99.3%

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

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

    \[\leadsto \color{blue}{{\left(\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\frac{1 - k}{4}\right)}}{{k}^{0.25}}\right)}^{2}} \]
  4. Taylor expanded in k around 0 39.6%

    \[\leadsto {\color{blue}{\left({\left(2 \cdot \frac{n \cdot \pi}{k}\right)}^{0.25}\right)}}^{2} \]
  5. Step-by-step derivation
    1. associate-*r/39.6%

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

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

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

      \[\leadsto {\left({\left(\frac{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    5. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(\pi \cdot 2\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    6. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{e^{\log \color{blue}{\left(2 \cdot \pi\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    7. rem-exp-log37.2%

      \[\leadsto {\left({\left(\frac{e^{\log \left(2 \cdot \pi\right)} \cdot \color{blue}{e^{\log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    8. exp-sum37.0%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(2 \cdot \pi\right) + \log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    9. +-commutative37.0%

      \[\leadsto {\left({\left(\frac{e^{\color{blue}{\log n + \log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    10. exp-sum37.2%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log n} \cdot e^{\log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    11. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{n} \cdot e^{\log \left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    12. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{n \cdot e^{\log \color{blue}{\left(\pi \cdot 2\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    13. rem-exp-log39.6%

      \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(\pi \cdot 2\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    14. *-commutative39.6%

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

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

    \[\leadsto \color{blue}{{\left(e^{0.25 \cdot \left(\log n + \log \left(2 \cdot \frac{\pi}{k}\right)\right)}\right)}^{2}} \]
  8. Simplified39.7%

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

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

Alternative 9: 38.6% accurate, 1.5× speedup?

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

\\
\sqrt{2 \cdot \frac{\pi \cdot n}{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. add-sqr-sqrt99.3%

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

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

    \[\leadsto \color{blue}{{\left(\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(\frac{1 - k}{4}\right)}}{{k}^{0.25}}\right)}^{2}} \]
  4. Taylor expanded in k around 0 39.6%

    \[\leadsto {\color{blue}{\left({\left(2 \cdot \frac{n \cdot \pi}{k}\right)}^{0.25}\right)}}^{2} \]
  5. Step-by-step derivation
    1. associate-*r/39.6%

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

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

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

      \[\leadsto {\left({\left(\frac{\color{blue}{\left(\pi \cdot 2\right)} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    5. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(\pi \cdot 2\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    6. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{e^{\log \color{blue}{\left(2 \cdot \pi\right)}} \cdot n}{k}\right)}^{0.25}\right)}^{2} \]
    7. rem-exp-log37.2%

      \[\leadsto {\left({\left(\frac{e^{\log \left(2 \cdot \pi\right)} \cdot \color{blue}{e^{\log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    8. exp-sum37.0%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log \left(2 \cdot \pi\right) + \log n}}}{k}\right)}^{0.25}\right)}^{2} \]
    9. +-commutative37.0%

      \[\leadsto {\left({\left(\frac{e^{\color{blue}{\log n + \log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    10. exp-sum37.2%

      \[\leadsto {\left({\left(\frac{\color{blue}{e^{\log n} \cdot e^{\log \left(2 \cdot \pi\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    11. rem-exp-log39.5%

      \[\leadsto {\left({\left(\frac{\color{blue}{n} \cdot e^{\log \left(2 \cdot \pi\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    12. *-commutative39.5%

      \[\leadsto {\left({\left(\frac{n \cdot e^{\log \color{blue}{\left(\pi \cdot 2\right)}}}{k}\right)}^{0.25}\right)}^{2} \]
    13. rem-exp-log39.6%

      \[\leadsto {\left({\left(\frac{n \cdot \color{blue}{\left(\pi \cdot 2\right)}}{k}\right)}^{0.25}\right)}^{2} \]
    14. *-commutative39.6%

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

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

    \[\leadsto \color{blue}{{\left(e^{0.25 \cdot \left(\log n + \log \left(2 \cdot \frac{\pi}{k}\right)\right)}\right)}^{2}} \]
  8. Simplified39.7%

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

      \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{\pi \cdot n}{k}}} \]
  10. Applied egg-rr39.7%

    \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{\pi \cdot n}{k}}} \]
  11. Final simplification39.7%

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

Reproduce

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