
(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 8 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 5.1e-29) (* (sqrt (* 2.0 (/ PI k))) (sqrt n)) (pow (/ k (pow (* PI (* 2.0 n)) (- 1.0 k))) -0.5)))
double code(double k, double n) {
double tmp;
if (k <= 5.1e-29) {
tmp = sqrt((2.0 * (((double) M_PI) / k))) * sqrt(n);
} else {
tmp = pow((k / pow((((double) M_PI) * (2.0 * n)), (1.0 - k))), -0.5);
}
return tmp;
}
public static double code(double k, double n) {
double tmp;
if (k <= 5.1e-29) {
tmp = Math.sqrt((2.0 * (Math.PI / k))) * Math.sqrt(n);
} else {
tmp = Math.pow((k / Math.pow((Math.PI * (2.0 * n)), (1.0 - k))), -0.5);
}
return tmp;
}
def code(k, n): tmp = 0 if k <= 5.1e-29: tmp = math.sqrt((2.0 * (math.pi / k))) * math.sqrt(n) else: tmp = math.pow((k / math.pow((math.pi * (2.0 * n)), (1.0 - k))), -0.5) return tmp
function code(k, n) tmp = 0.0 if (k <= 5.1e-29) tmp = Float64(sqrt(Float64(2.0 * Float64(pi / k))) * sqrt(n)); else tmp = Float64(k / (Float64(pi * Float64(2.0 * n)) ^ Float64(1.0 - k))) ^ -0.5; end return tmp end
function tmp_2 = code(k, n) tmp = 0.0; if (k <= 5.1e-29) tmp = sqrt((2.0 * (pi / k))) * sqrt(n); else tmp = (k / ((pi * (2.0 * n)) ^ (1.0 - k))) ^ -0.5; end tmp_2 = tmp; end
code[k_, n_] := If[LessEqual[k, 5.1e-29], N[(N[Sqrt[N[(2.0 * N[(Pi / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision], N[Power[N[(k / N[Power[N[(Pi * N[(2.0 * n), $MachinePrecision]), $MachinePrecision], N[(1.0 - k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.1 \cdot 10^{-29}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\pi}{k}} \cdot \sqrt{n}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{k}{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{\left(1 - k\right)}}\right)}^{-0.5}\\
\end{array}
\end{array}
if k < 5.09999999999999986e-29Initial program 99.3%
add-cube-cbrt97.9%
pow397.9%
associate-*l/97.7%
*-un-lft-identity97.7%
associate-*r*97.7%
div-sub97.7%
metadata-eval97.7%
div-inv97.7%
metadata-eval97.7%
Applied egg-rr97.7%
Taylor expanded in k around 0 73.6%
*-commutative73.6%
associate-/l*73.6%
Simplified73.6%
expm1-log1p-u69.9%
expm1-udef52.3%
sqrt-unprod52.3%
associate-/r/52.3%
Applied egg-rr52.3%
expm1-def70.0%
expm1-log1p73.9%
*-commutative73.9%
associate-*r*73.9%
*-commutative73.9%
associate-*l/73.8%
*-lft-identity73.8%
times-frac73.8%
/-rgt-identity73.8%
Simplified73.8%
*-commutative73.8%
sqrt-prod99.5%
*-un-lft-identity99.5%
times-frac99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 5.09999999999999986e-29 < k Initial program 99.6%
associate-/r/99.6%
associate-*r*99.6%
div-sub99.6%
metadata-eval99.6%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Applied egg-rr99.6%
*-commutative99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (k n) :precision binary64 (if (<= k 3.3e-30) (* (sqrt (* 2.0 (/ PI k))) (sqrt n)) (pow (* k (pow (* 2.0 (* PI n)) (+ k -1.0))) -0.5)))
double code(double k, double n) {
double tmp;
if (k <= 3.3e-30) {
tmp = sqrt((2.0 * (((double) M_PI) / k))) * sqrt(n);
} else {
tmp = pow((k * pow((2.0 * (((double) M_PI) * n)), (k + -1.0))), -0.5);
}
return tmp;
}
public static double code(double k, double n) {
double tmp;
if (k <= 3.3e-30) {
tmp = Math.sqrt((2.0 * (Math.PI / k))) * Math.sqrt(n);
} else {
tmp = Math.pow((k * Math.pow((2.0 * (Math.PI * n)), (k + -1.0))), -0.5);
}
return tmp;
}
def code(k, n): tmp = 0 if k <= 3.3e-30: tmp = math.sqrt((2.0 * (math.pi / k))) * math.sqrt(n) else: tmp = math.pow((k * math.pow((2.0 * (math.pi * n)), (k + -1.0))), -0.5) return tmp
function code(k, n) tmp = 0.0 if (k <= 3.3e-30) tmp = Float64(sqrt(Float64(2.0 * Float64(pi / k))) * sqrt(n)); else tmp = Float64(k * (Float64(2.0 * Float64(pi * n)) ^ Float64(k + -1.0))) ^ -0.5; end return tmp end
function tmp_2 = code(k, n) tmp = 0.0; if (k <= 3.3e-30) tmp = sqrt((2.0 * (pi / k))) * sqrt(n); else tmp = (k * ((2.0 * (pi * n)) ^ (k + -1.0))) ^ -0.5; end tmp_2 = tmp; end
code[k_, n_] := If[LessEqual[k, 3.3e-30], N[(N[Sqrt[N[(2.0 * N[(Pi / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision], N[Power[N[(k * N[Power[N[(2.0 * N[(Pi * n), $MachinePrecision]), $MachinePrecision], N[(k + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.3 \cdot 10^{-30}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\pi}{k}} \cdot \sqrt{n}\\
\mathbf{else}:\\
\;\;\;\;{\left(k \cdot {\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(k + -1\right)}\right)}^{-0.5}\\
\end{array}
\end{array}
if k < 3.3000000000000003e-30Initial program 99.3%
add-cube-cbrt97.9%
pow397.9%
associate-*l/97.7%
*-un-lft-identity97.7%
associate-*r*97.7%
div-sub97.7%
metadata-eval97.7%
div-inv97.7%
metadata-eval97.7%
Applied egg-rr97.7%
Taylor expanded in k around 0 73.6%
*-commutative73.6%
associate-/l*73.6%
Simplified73.6%
expm1-log1p-u69.9%
expm1-udef52.3%
sqrt-unprod52.3%
associate-/r/52.3%
Applied egg-rr52.3%
expm1-def70.0%
expm1-log1p73.9%
*-commutative73.9%
associate-*r*73.9%
*-commutative73.9%
associate-*l/73.8%
*-lft-identity73.8%
times-frac73.8%
/-rgt-identity73.8%
Simplified73.8%
*-commutative73.8%
sqrt-prod99.5%
*-un-lft-identity99.5%
times-frac99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 3.3000000000000003e-30 < k Initial program 99.6%
associate-/r/99.6%
associate-*r*99.6%
div-sub99.6%
metadata-eval99.6%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Applied egg-rr99.6%
unpow1/299.6%
associate-*r*99.6%
*-commutative99.6%
*-commutative99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
remove-double-neg99.6%
metadata-eval99.6%
Simplified99.6%
inv-pow99.6%
sqrt-unprod99.6%
sqrt-pow299.6%
*-commutative99.6%
associate-*l*99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification99.5%
(FPCore (k n) :precision binary64 (if (<= k 4.2e-29) (* (sqrt (* 2.0 (/ PI k))) (sqrt n)) (sqrt (/ (pow (* PI (* 2.0 n)) (- 1.0 k)) k))))
double code(double k, double n) {
double tmp;
if (k <= 4.2e-29) {
tmp = sqrt((2.0 * (((double) M_PI) / k))) * sqrt(n);
} 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 <= 4.2e-29) {
tmp = Math.sqrt((2.0 * (Math.PI / k))) * Math.sqrt(n);
} 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 <= 4.2e-29: tmp = math.sqrt((2.0 * (math.pi / k))) * math.sqrt(n) 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 <= 4.2e-29) tmp = Float64(sqrt(Float64(2.0 * Float64(pi / k))) * sqrt(n)); 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 <= 4.2e-29) tmp = sqrt((2.0 * (pi / k))) * sqrt(n); else tmp = sqrt((((pi * (2.0 * n)) ^ (1.0 - k)) / k)); end tmp_2 = tmp; end
code[k_, n_] := If[LessEqual[k, 4.2e-29], N[(N[Sqrt[N[(2.0 * N[(Pi / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $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 4.2 \cdot 10^{-29}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\pi}{k}} \cdot \sqrt{n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(\pi \cdot \left(2 \cdot n\right)\right)}^{\left(1 - k\right)}}{k}}\\
\end{array}
\end{array}
if k < 4.19999999999999979e-29Initial program 99.3%
add-cube-cbrt97.9%
pow397.9%
associate-*l/97.7%
*-un-lft-identity97.7%
associate-*r*97.7%
div-sub97.7%
metadata-eval97.7%
div-inv97.7%
metadata-eval97.7%
Applied egg-rr97.7%
Taylor expanded in k around 0 73.6%
*-commutative73.6%
associate-/l*73.6%
Simplified73.6%
expm1-log1p-u69.9%
expm1-udef52.3%
sqrt-unprod52.3%
associate-/r/52.3%
Applied egg-rr52.3%
expm1-def70.0%
expm1-log1p73.9%
*-commutative73.9%
associate-*r*73.9%
*-commutative73.9%
associate-*l/73.8%
*-lft-identity73.8%
times-frac73.8%
/-rgt-identity73.8%
Simplified73.8%
*-commutative73.8%
sqrt-prod99.5%
*-un-lft-identity99.5%
times-frac99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 4.19999999999999979e-29 < k Initial program 99.6%
add-sqr-sqrt99.6%
sqrt-unprod99.6%
*-commutative99.6%
div-inv99.6%
*-commutative99.6%
div-inv99.6%
frac-times99.6%
Applied egg-rr99.6%
Simplified99.6%
Final simplification99.5%
(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.5%
associate-*l/99.5%
*-lft-identity99.5%
sqr-pow99.3%
pow-sqr99.5%
associate-*l*99.5%
*-commutative99.5%
associate-*l/99.5%
associate-/l*99.5%
metadata-eval99.5%
/-rgt-identity99.5%
div-sub99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (k n) :precision binary64 (sqrt (fabs (* (/ n k) (* 2.0 PI)))))
double code(double k, double n) {
return sqrt(fabs(((n / k) * (2.0 * ((double) M_PI)))));
}
public static double code(double k, double n) {
return Math.sqrt(Math.abs(((n / k) * (2.0 * Math.PI))));
}
def code(k, n): return math.sqrt(math.fabs(((n / k) * (2.0 * math.pi))))
function code(k, n) return sqrt(abs(Float64(Float64(n / k) * Float64(2.0 * pi)))) end
function tmp = code(k, n) tmp = sqrt(abs(((n / k) * (2.0 * pi)))); end
code[k_, n_] := N[Sqrt[N[Abs[N[(N[(n / k), $MachinePrecision] * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left|\frac{n}{k} \cdot \left(2 \cdot \pi\right)\right|}
\end{array}
Initial program 99.5%
add-cube-cbrt98.8%
pow398.8%
associate-*l/98.7%
*-un-lft-identity98.7%
associate-*r*98.7%
div-sub98.7%
metadata-eval98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
Taylor expanded in k around 0 39.4%
*-commutative39.4%
associate-/l*39.4%
Simplified39.4%
expm1-log1p-u37.5%
expm1-udef33.5%
sqrt-unprod33.5%
associate-/r/33.5%
Applied egg-rr33.5%
expm1-def37.6%
expm1-log1p39.5%
*-commutative39.5%
associate-*r*39.5%
*-commutative39.5%
associate-*l/39.5%
*-lft-identity39.5%
times-frac39.5%
/-rgt-identity39.5%
Simplified39.5%
add-sqr-sqrt39.5%
pow1/239.5%
pow1/239.5%
pow-prod-down26.9%
pow226.9%
associate-*r/27.0%
*-commutative27.0%
associate-*l*27.0%
*-commutative27.0%
*-un-lft-identity27.0%
times-frac27.0%
metadata-eval27.0%
associate-/l*27.0%
Applied egg-rr27.0%
unpow1/227.0%
unpow227.0%
rem-sqrt-square39.5%
*-commutative39.5%
associate-/r/39.6%
associate-*l*39.6%
*-commutative39.6%
Simplified39.6%
Final simplification39.6%
(FPCore (k n) :precision binary64 (* (sqrt (* 2.0 (/ PI k))) (sqrt n)))
double code(double k, double n) {
return sqrt((2.0 * (((double) M_PI) / k))) * sqrt(n);
}
public static double code(double k, double n) {
return Math.sqrt((2.0 * (Math.PI / k))) * Math.sqrt(n);
}
def code(k, n): return math.sqrt((2.0 * (math.pi / k))) * math.sqrt(n)
function code(k, n) return Float64(sqrt(Float64(2.0 * Float64(pi / k))) * sqrt(n)) end
function tmp = code(k, n) tmp = sqrt((2.0 * (pi / k))) * sqrt(n); end
code[k_, n_] := N[(N[Sqrt[N[(2.0 * N[(Pi / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \frac{\pi}{k}} \cdot \sqrt{n}
\end{array}
Initial program 99.5%
add-cube-cbrt98.8%
pow398.8%
associate-*l/98.7%
*-un-lft-identity98.7%
associate-*r*98.7%
div-sub98.7%
metadata-eval98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
Taylor expanded in k around 0 39.4%
*-commutative39.4%
associate-/l*39.4%
Simplified39.4%
expm1-log1p-u37.5%
expm1-udef33.5%
sqrt-unprod33.5%
associate-/r/33.5%
Applied egg-rr33.5%
expm1-def37.6%
expm1-log1p39.5%
*-commutative39.5%
associate-*r*39.5%
*-commutative39.5%
associate-*l/39.5%
*-lft-identity39.5%
times-frac39.5%
/-rgt-identity39.5%
Simplified39.5%
*-commutative39.5%
sqrt-prod51.5%
*-un-lft-identity51.5%
times-frac51.5%
metadata-eval51.5%
Applied egg-rr51.5%
Final simplification51.5%
(FPCore (k n) :precision binary64 (sqrt (* n (/ (* 2.0 PI) k))))
double code(double k, double n) {
return sqrt((n * ((2.0 * ((double) M_PI)) / k)));
}
public static double code(double k, double n) {
return Math.sqrt((n * ((2.0 * Math.PI) / k)));
}
def code(k, n): return math.sqrt((n * ((2.0 * math.pi) / k)))
function code(k, n) return sqrt(Float64(n * Float64(Float64(2.0 * pi) / k))) end
function tmp = code(k, n) tmp = sqrt((n * ((2.0 * pi) / k))); end
code[k_, n_] := N[Sqrt[N[(n * N[(N[(2.0 * Pi), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{n \cdot \frac{2 \cdot \pi}{k}}
\end{array}
Initial program 99.5%
add-cube-cbrt98.8%
pow398.8%
associate-*l/98.7%
*-un-lft-identity98.7%
associate-*r*98.7%
div-sub98.7%
metadata-eval98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
Taylor expanded in k around 0 39.4%
*-commutative39.4%
associate-/l*39.4%
Simplified39.4%
expm1-log1p-u37.5%
expm1-udef33.5%
sqrt-unprod33.5%
associate-/r/33.5%
Applied egg-rr33.5%
expm1-def37.6%
expm1-log1p39.5%
*-commutative39.5%
associate-*r*39.5%
*-commutative39.5%
associate-*l/39.5%
*-lft-identity39.5%
times-frac39.5%
/-rgt-identity39.5%
Simplified39.5%
Final simplification39.5%
(FPCore (k n) :precision binary64 (sqrt (* (/ n k) (* 2.0 PI))))
double code(double k, double n) {
return sqrt(((n / k) * (2.0 * ((double) M_PI))));
}
public static double code(double k, double n) {
return Math.sqrt(((n / k) * (2.0 * Math.PI)));
}
def code(k, n): return math.sqrt(((n / k) * (2.0 * math.pi)))
function code(k, n) return sqrt(Float64(Float64(n / k) * Float64(2.0 * pi))) end
function tmp = code(k, n) tmp = sqrt(((n / k) * (2.0 * pi))); end
code[k_, n_] := N[Sqrt[N[(N[(n / k), $MachinePrecision] * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\frac{n}{k} \cdot \left(2 \cdot \pi\right)}
\end{array}
Initial program 99.5%
add-cube-cbrt98.8%
pow398.8%
associate-*l/98.7%
*-un-lft-identity98.7%
associate-*r*98.7%
div-sub98.7%
metadata-eval98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
Taylor expanded in k around 0 39.4%
*-commutative39.4%
associate-/l*39.4%
Simplified39.4%
expm1-log1p-u37.5%
expm1-udef33.5%
sqrt-unprod33.5%
associate-/r/33.5%
Applied egg-rr33.5%
expm1-def37.6%
expm1-log1p39.5%
*-commutative39.5%
associate-*l*39.5%
*-commutative39.5%
Simplified39.5%
Final simplification39.5%
herbie shell --seed 2023305
(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))))