
(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:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (k n) :precision binary64 (if (<= k 3.7e-45) (* (sqrt n) (sqrt (* 2.0 (/ PI k)))) (sqrt (/ (pow (* 2.0 (* PI n)) (- 1.0 k)) k))))
double code(double k, double n) {
double tmp;
if (k <= 3.7e-45) {
tmp = sqrt(n) * sqrt((2.0 * (((double) M_PI) / k)));
} else {
tmp = sqrt((pow((2.0 * (((double) M_PI) * n)), (1.0 - k)) / k));
}
return tmp;
}
public static double code(double k, double n) {
double tmp;
if (k <= 3.7e-45) {
tmp = Math.sqrt(n) * Math.sqrt((2.0 * (Math.PI / k)));
} else {
tmp = Math.sqrt((Math.pow((2.0 * (Math.PI * n)), (1.0 - k)) / k));
}
return tmp;
}
def code(k, n): tmp = 0 if k <= 3.7e-45: tmp = math.sqrt(n) * math.sqrt((2.0 * (math.pi / k))) else: tmp = math.sqrt((math.pow((2.0 * (math.pi * n)), (1.0 - k)) / k)) return tmp
function code(k, n) tmp = 0.0 if (k <= 3.7e-45) tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(pi / k)))); else tmp = sqrt(Float64((Float64(2.0 * Float64(pi * n)) ^ Float64(1.0 - k)) / k)); end return tmp end
function tmp_2 = code(k, n) tmp = 0.0; if (k <= 3.7e-45) tmp = sqrt(n) * sqrt((2.0 * (pi / k))); else tmp = sqrt((((2.0 * (pi * n)) ^ (1.0 - k)) / k)); end tmp_2 = tmp; end
code[k_, n_] := If[LessEqual[k, 3.7e-45], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(Pi / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[Power[N[(2.0 * N[(Pi * n), $MachinePrecision]), $MachinePrecision], N[(1.0 - k), $MachinePrecision]], $MachinePrecision] / k), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.7 \cdot 10^{-45}:\\
\;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \frac{\pi}{k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(1 - k\right)}}{k}}\\
\end{array}
\end{array}
if k < 3.7e-45Initial program 99.3%
Taylor expanded in k around 0 67.9%
*-commutative67.9%
associate-/l*67.9%
Simplified67.9%
pow167.9%
sqrt-unprod68.0%
Applied egg-rr68.0%
unpow168.0%
associate-*r*68.0%
*-commutative68.0%
associate-*l*68.0%
Simplified68.0%
sqrt-prod99.5%
clear-num99.5%
un-div-inv99.5%
Applied egg-rr99.5%
associate-/r/99.4%
associate-*l/99.5%
associate-/l*99.5%
Simplified99.5%
if 3.7e-45 < k Initial program 99.7%
Applied egg-rr99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
associate-*l*99.8%
metadata-eval99.8%
*-commutative99.8%
neg-mul-199.8%
sub-neg99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (k n) :precision binary64 (if (<= k 1.35e+25) (* (sqrt n) (sqrt (* 2.0 (/ PI k)))) (sqrt (+ 1.0 (fma PI (* n (/ 2.0 k)) -1.0)))))
double code(double k, double n) {
double tmp;
if (k <= 1.35e+25) {
tmp = sqrt(n) * sqrt((2.0 * (((double) M_PI) / k)));
} else {
tmp = sqrt((1.0 + fma(((double) M_PI), (n * (2.0 / k)), -1.0)));
}
return tmp;
}
function code(k, n) tmp = 0.0 if (k <= 1.35e+25) tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(pi / k)))); else tmp = sqrt(Float64(1.0 + fma(pi, Float64(n * Float64(2.0 / k)), -1.0))); end return tmp end
code[k_, n_] := If[LessEqual[k, 1.35e+25], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(Pi / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(1.0 + N[(Pi * N[(n * N[(2.0 / k), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \frac{\pi}{k}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{1 + \mathsf{fma}\left(\pi, n \cdot \frac{2}{k}, -1\right)}\\
\end{array}
\end{array}
if k < 1.35e25Initial program 99.0%
Taylor expanded in k around 0 64.3%
*-commutative64.3%
associate-/l*64.2%
Simplified64.2%
pow164.2%
sqrt-unprod64.4%
Applied egg-rr64.4%
unpow164.4%
associate-*r*64.4%
*-commutative64.4%
associate-*l*64.4%
Simplified64.4%
sqrt-prod88.7%
clear-num88.7%
un-div-inv88.7%
Applied egg-rr88.7%
associate-/r/88.6%
associate-*l/88.7%
associate-/l*88.7%
Simplified88.7%
if 1.35e25 < k Initial program 100.0%
Taylor expanded in k around 0 1.9%
*-commutative1.9%
associate-/l*1.9%
Simplified1.9%
pow11.9%
sqrt-unprod1.9%
Applied egg-rr1.9%
unpow11.9%
associate-*r*1.9%
*-commutative1.9%
associate-*l*1.9%
Simplified1.9%
Taylor expanded in n around 0 1.9%
*-commutative1.9%
associate-*r/1.9%
Simplified1.9%
associate-*r*1.9%
clear-num1.9%
associate-/r/1.9%
associate-*l*1.9%
associate-*r*1.9%
expm1-log1p-u1.9%
*-commutative1.9%
expm1-undefine41.0%
*-commutative41.0%
associate-*r*41.0%
*-commutative41.0%
associate-*l*41.0%
div-inv41.0%
associate-*l*41.0%
Applied egg-rr41.0%
log1p-undefine41.0%
rem-exp-log41.0%
associate-+r-41.0%
*-commutative41.0%
associate-*l*41.0%
associate-/l*41.0%
fmm-def41.0%
*-commutative41.0%
associate-/l*41.0%
metadata-eval41.0%
Simplified41.0%
(FPCore (k n) :precision binary64 (* (pow (* 2.0 (* PI n)) (+ 0.5 (* k -0.5))) (pow k -0.5)))
double code(double k, double n) {
return pow((2.0 * (((double) M_PI) * n)), (0.5 + (k * -0.5))) * pow(k, -0.5);
}
public static double code(double k, double n) {
return Math.pow((2.0 * (Math.PI * n)), (0.5 + (k * -0.5))) * Math.pow(k, -0.5);
}
def code(k, n): return math.pow((2.0 * (math.pi * n)), (0.5 + (k * -0.5))) * math.pow(k, -0.5)
function code(k, n) return Float64((Float64(2.0 * Float64(pi * n)) ^ Float64(0.5 + Float64(k * -0.5))) * (k ^ -0.5)) end
function tmp = code(k, n) tmp = ((2.0 * (pi * n)) ^ (0.5 + (k * -0.5))) * (k ^ -0.5); end
code[k_, n_] := N[(N[Power[N[(2.0 * N[(Pi * n), $MachinePrecision]), $MachinePrecision], N[(0.5 + N[(k * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[k, -0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(0.5 + k \cdot -0.5\right)} \cdot {k}^{-0.5}
\end{array}
Initial program 99.6%
associate-*l/99.6%
*-lft-identity99.6%
associate-*l*99.6%
div-sub99.6%
metadata-eval99.6%
Simplified99.6%
metadata-eval99.6%
div-sub99.6%
associate-*r*99.6%
div-inv99.6%
associate-*r*99.6%
div-sub99.6%
metadata-eval99.6%
sub-neg99.6%
div-inv99.6%
metadata-eval99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
(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}
Initial program 99.6%
associate-*l/99.6%
*-lft-identity99.6%
associate-*l*99.6%
div-sub99.6%
metadata-eval99.6%
Simplified99.6%
(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}
Initial program 99.6%
Taylor expanded in k around 0 28.9%
*-commutative28.9%
associate-/l*28.9%
Simplified28.9%
pow128.9%
sqrt-unprod29.0%
Applied egg-rr29.0%
unpow129.0%
associate-*r*29.0%
*-commutative29.0%
associate-*l*29.0%
Simplified29.0%
sqrt-prod39.5%
clear-num39.5%
un-div-inv39.5%
Applied egg-rr39.5%
associate-/r/39.5%
associate-*l/39.5%
associate-/l*39.5%
Simplified39.5%
(FPCore (k n) :precision binary64 (sqrt (fabs (* n (* PI (/ 2.0 k))))))
double code(double k, double n) {
return sqrt(fabs((n * (((double) M_PI) * (2.0 / k)))));
}
public static double code(double k, double n) {
return Math.sqrt(Math.abs((n * (Math.PI * (2.0 / k)))));
}
def code(k, n): return math.sqrt(math.fabs((n * (math.pi * (2.0 / k)))))
function code(k, n) return sqrt(abs(Float64(n * Float64(pi * Float64(2.0 / k))))) end
function tmp = code(k, n) tmp = sqrt(abs((n * (pi * (2.0 / k))))); end
code[k_, n_] := N[Sqrt[N[Abs[N[(n * N[(Pi * N[(2.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left|n \cdot \left(\pi \cdot \frac{2}{k}\right)\right|}
\end{array}
Initial program 99.6%
Taylor expanded in k around 0 28.9%
*-commutative28.9%
associate-/l*28.9%
Simplified28.9%
pow128.9%
sqrt-unprod29.0%
Applied egg-rr29.0%
unpow129.0%
associate-*r*29.0%
*-commutative29.0%
associate-*l*29.0%
Simplified29.0%
Taylor expanded in n around 0 29.0%
*-commutative29.0%
associate-*r/29.0%
Simplified29.0%
pow129.0%
metadata-eval29.0%
pow-sqr29.0%
pow-prod-down23.6%
*-commutative23.6%
*-commutative23.6%
swap-sqr23.6%
pow223.6%
metadata-eval23.6%
Applied egg-rr23.6%
unpow1/223.6%
unpow223.6%
metadata-eval23.6%
swap-sqr23.6%
*-commutative23.6%
associate-*r*23.6%
*-commutative23.6%
associate-*r*23.6%
rem-sqrt-square29.6%
associate-*l/29.5%
associate-/l*29.6%
associate-/l*29.6%
Simplified29.6%
(FPCore (k n) :precision binary64 (/ 1.0 (sqrt (/ k (* PI (* 2.0 n))))))
double code(double k, double n) {
return 1.0 / sqrt((k / (((double) M_PI) * (2.0 * n))));
}
public static double code(double k, double n) {
return 1.0 / Math.sqrt((k / (Math.PI * (2.0 * n))));
}
def code(k, n): return 1.0 / math.sqrt((k / (math.pi * (2.0 * n))))
function code(k, n) return Float64(1.0 / sqrt(Float64(k / Float64(pi * Float64(2.0 * n))))) end
function tmp = code(k, n) tmp = 1.0 / sqrt((k / (pi * (2.0 * n)))); end
code[k_, n_] := N[(1.0 / N[Sqrt[N[(k / N[(Pi * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\sqrt{\frac{k}{\pi \cdot \left(2 \cdot n\right)}}}
\end{array}
Initial program 99.6%
Applied egg-rr89.1%
distribute-rgt-in89.1%
metadata-eval89.1%
associate-*l*89.1%
metadata-eval89.1%
*-commutative89.1%
neg-mul-189.1%
sub-neg89.1%
*-commutative89.1%
Simplified89.1%
clear-num89.1%
sqrt-div89.7%
metadata-eval89.7%
associate-*r*89.7%
*-commutative89.7%
Applied egg-rr89.7%
Taylor expanded in k around 0 29.6%
associate-*r*29.6%
*-commutative29.6%
*-commutative29.6%
Simplified29.6%
Final simplification29.6%
(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(Float64(0.5 / 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[(N[(0.5 / n), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\sqrt{k \cdot \frac{\frac{0.5}{n}}{\pi}}}
\end{array}
Initial program 99.6%
Applied egg-rr89.1%
distribute-rgt-in89.1%
metadata-eval89.1%
associate-*l*89.1%
metadata-eval89.1%
*-commutative89.1%
neg-mul-189.1%
sub-neg89.1%
*-commutative89.1%
Simplified89.1%
clear-num89.1%
sqrt-div89.7%
metadata-eval89.7%
associate-*r*89.7%
*-commutative89.7%
Applied egg-rr89.7%
Taylor expanded in k around 0 29.6%
associate-*r/29.6%
*-commutative29.6%
associate-*r/29.5%
associate-/r*29.6%
Simplified29.6%
(FPCore (k n) :precision binary64 (sqrt (/ (* 2.0 n) (/ k PI))))
double code(double k, double n) {
return sqrt(((2.0 * n) / (k / ((double) M_PI))));
}
public static double code(double k, double n) {
return Math.sqrt(((2.0 * n) / (k / Math.PI)));
}
def code(k, n): return math.sqrt(((2.0 * n) / (k / math.pi)))
function code(k, n) return sqrt(Float64(Float64(2.0 * n) / Float64(k / pi))) end
function tmp = code(k, n) tmp = sqrt(((2.0 * n) / (k / pi))); end
code[k_, n_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] / N[(k / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\frac{2 \cdot n}{\frac{k}{\pi}}}
\end{array}
Initial program 99.6%
Taylor expanded in k around 0 28.9%
*-commutative28.9%
associate-/l*28.9%
Simplified28.9%
pow128.9%
sqrt-unprod29.0%
Applied egg-rr29.0%
unpow129.0%
associate-*r*29.0%
*-commutative29.0%
associate-*l*29.0%
Simplified29.0%
associate-*r*29.0%
*-commutative29.0%
clear-num29.0%
un-div-inv29.0%
Applied egg-rr29.0%
(FPCore (k n) :precision binary64 (sqrt (* n (* PI (/ 2.0 k)))))
double code(double k, double n) {
return sqrt((n * (((double) M_PI) * (2.0 / k))));
}
public static double code(double k, double n) {
return Math.sqrt((n * (Math.PI * (2.0 / k))));
}
def code(k, n): return math.sqrt((n * (math.pi * (2.0 / k))))
function code(k, n) return sqrt(Float64(n * Float64(pi * Float64(2.0 / k)))) end
function tmp = code(k, n) tmp = sqrt((n * (pi * (2.0 / k)))); end
code[k_, n_] := N[Sqrt[N[(n * N[(Pi * N[(2.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{n \cdot \left(\pi \cdot \frac{2}{k}\right)}
\end{array}
Initial program 99.6%
Taylor expanded in k around 0 28.9%
*-commutative28.9%
associate-/l*28.9%
Simplified28.9%
pow128.9%
sqrt-unprod29.0%
Applied egg-rr29.0%
unpow129.0%
associate-*r*29.0%
*-commutative29.0%
associate-*l*29.0%
Simplified29.0%
Taylor expanded in n around 0 29.0%
*-commutative29.0%
associate-*r/29.0%
Simplified29.0%
Taylor expanded in n around 0 29.0%
associate-*r/29.0%
*-commutative29.0%
associate-*r*29.0%
associate-/l*29.0%
associate-/l*29.0%
Simplified29.0%
(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(pi * Float64(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[(Pi * N[(n / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(\pi \cdot \frac{n}{k}\right)}
\end{array}
Initial program 99.6%
Taylor expanded in k around 0 28.9%
*-commutative28.9%
associate-/l*28.9%
Simplified28.9%
pow128.9%
sqrt-unprod29.0%
Applied egg-rr29.0%
unpow129.0%
associate-*r*29.0%
*-commutative29.0%
associate-*l*29.0%
Simplified29.0%
Taylor expanded in n around 0 29.0%
*-commutative29.0%
associate-*r/29.0%
Simplified29.0%
herbie shell --seed 2024172
(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))))