
(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 9 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 2e-20) (* (pow k -0.5) (sqrt (* PI (* 2.0 n)))) (/ 1.0 (sqrt (/ k (pow (* 2.0 (* PI n)) (- 1.0 k)))))))
double code(double k, double n) {
double tmp;
if (k <= 2e-20) {
tmp = pow(k, -0.5) * sqrt((((double) M_PI) * (2.0 * n)));
} else {
tmp = 1.0 / sqrt((k / pow((2.0 * (((double) M_PI) * n)), (1.0 - k))));
}
return tmp;
}
public static double code(double k, double n) {
double tmp;
if (k <= 2e-20) {
tmp = Math.pow(k, -0.5) * Math.sqrt((Math.PI * (2.0 * n)));
} else {
tmp = 1.0 / Math.sqrt((k / Math.pow((2.0 * (Math.PI * n)), (1.0 - k))));
}
return tmp;
}
def code(k, n): tmp = 0 if k <= 2e-20: tmp = math.pow(k, -0.5) * math.sqrt((math.pi * (2.0 * n))) else: tmp = 1.0 / math.sqrt((k / math.pow((2.0 * (math.pi * n)), (1.0 - k)))) return tmp
function code(k, n) tmp = 0.0 if (k <= 2e-20) tmp = Float64((k ^ -0.5) * sqrt(Float64(pi * Float64(2.0 * n)))); else tmp = Float64(1.0 / sqrt(Float64(k / (Float64(2.0 * Float64(pi * n)) ^ Float64(1.0 - k))))); end return tmp end
function tmp_2 = code(k, n) tmp = 0.0; if (k <= 2e-20) tmp = (k ^ -0.5) * sqrt((pi * (2.0 * n))); else tmp = 1.0 / sqrt((k / ((2.0 * (pi * n)) ^ (1.0 - k)))); end tmp_2 = tmp; end
code[k_, n_] := If[LessEqual[k, 2e-20], N[(N[Power[k, -0.5], $MachinePrecision] * N[Sqrt[N[(Pi * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sqrt[N[(k / N[Power[N[(2.0 * N[(Pi * n), $MachinePrecision]), $MachinePrecision], N[(1.0 - k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-20}:\\
\;\;\;\;{k}^{-0.5} \cdot \sqrt{\pi \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{\frac{k}{{\left(2 \cdot \left(\pi \cdot n\right)\right)}^{\left(1 - k\right)}}}}\\
\end{array}
\end{array}
if k < 1.99999999999999989e-20Initial program 99.4%
Taylor expanded in k around 0 68.4%
*-commutative68.4%
associate-/l*68.4%
Simplified68.4%
pow168.4%
sqrt-unprod68.6%
Applied egg-rr68.6%
unpow168.6%
associate-*r/68.6%
associate-/l*68.6%
*-commutative68.6%
*-commutative68.6%
associate-/l*68.6%
*-commutative68.6%
Simplified68.6%
associate-*r/68.6%
*-commutative68.6%
*-commutative68.6%
sqrt-div99.4%
div-inv99.4%
*-commutative99.4%
inv-pow99.4%
sqrt-pow299.5%
metadata-eval99.5%
*-commutative99.5%
associate-*l*99.5%
Applied egg-rr99.5%
if 1.99999999999999989e-20 < k Initial program 99.5%
associate-*l/99.5%
*-lft-identity99.5%
associate-*l*99.5%
div-sub99.5%
metadata-eval99.5%
Simplified99.5%
div-inv99.5%
div-inv99.5%
metadata-eval99.5%
inv-pow99.5%
sqrt-pow299.5%
metadata-eval99.5%
Applied egg-rr99.5%
Applied egg-rr99.5%
Final simplification99.5%
(FPCore (k n) :precision binary64 (if (<= k 1.45e-20) (* (pow k -0.5) (sqrt (* PI (* 2.0 n)))) (sqrt (/ (pow (* n (* 2.0 PI)) (- 1.0 k)) k))))
double code(double k, double n) {
double tmp;
if (k <= 1.45e-20) {
tmp = pow(k, -0.5) * sqrt((((double) M_PI) * (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 <= 1.45e-20) {
tmp = Math.pow(k, -0.5) * Math.sqrt((Math.PI * (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 <= 1.45e-20: tmp = math.pow(k, -0.5) * math.sqrt((math.pi * (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 <= 1.45e-20) tmp = Float64((k ^ -0.5) * sqrt(Float64(pi * 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 <= 1.45e-20) tmp = (k ^ -0.5) * sqrt((pi * (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, 1.45e-20], N[(N[Power[k, -0.5], $MachinePrecision] * N[Sqrt[N[(Pi * N[(2.0 * n), $MachinePrecision]), $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 1.45 \cdot 10^{-20}:\\
\;\;\;\;{k}^{-0.5} \cdot \sqrt{\pi \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{{\left(n \cdot \left(2 \cdot \pi\right)\right)}^{\left(1 - k\right)}}{k}}\\
\end{array}
\end{array}
if k < 1.45e-20Initial program 99.4%
Taylor expanded in k around 0 68.4%
*-commutative68.4%
associate-/l*68.4%
Simplified68.4%
pow168.4%
sqrt-unprod68.6%
Applied egg-rr68.6%
unpow168.6%
associate-*r/68.6%
associate-/l*68.6%
*-commutative68.6%
*-commutative68.6%
associate-/l*68.6%
*-commutative68.6%
Simplified68.6%
associate-*r/68.6%
*-commutative68.6%
*-commutative68.6%
sqrt-div99.4%
div-inv99.4%
*-commutative99.4%
inv-pow99.4%
sqrt-pow299.5%
metadata-eval99.5%
*-commutative99.5%
associate-*l*99.5%
Applied egg-rr99.5%
if 1.45e-20 < k Initial program 99.5%
add-sqr-sqrt99.5%
sqrt-unprod99.5%
*-commutative99.5%
associate-*r*99.5%
div-sub99.5%
metadata-eval99.5%
div-inv99.5%
*-commutative99.5%
Applied egg-rr99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (k n) :precision binary64 (if (<= k 1.5e+101) (* (pow k -0.5) (sqrt (* PI (* 2.0 n)))) (sqrt (+ -1.0 (fma n (* PI (/ 2.0 k)) 1.0)))))
double code(double k, double n) {
double tmp;
if (k <= 1.5e+101) {
tmp = pow(k, -0.5) * sqrt((((double) M_PI) * (2.0 * n)));
} else {
tmp = sqrt((-1.0 + fma(n, (((double) M_PI) * (2.0 / k)), 1.0)));
}
return tmp;
}
function code(k, n) tmp = 0.0 if (k <= 1.5e+101) tmp = Float64((k ^ -0.5) * sqrt(Float64(pi * Float64(2.0 * n)))); else tmp = sqrt(Float64(-1.0 + fma(n, Float64(pi * Float64(2.0 / k)), 1.0))); end return tmp end
code[k_, n_] := If[LessEqual[k, 1.5e+101], N[(N[Power[k, -0.5], $MachinePrecision] * N[Sqrt[N[(Pi * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(-1.0 + N[(n * N[(Pi * N[(2.0 / k), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.5 \cdot 10^{+101}:\\
\;\;\;\;{k}^{-0.5} \cdot \sqrt{\pi \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-1 + \mathsf{fma}\left(n, \pi \cdot \frac{2}{k}, 1\right)}\\
\end{array}
\end{array}
if k < 1.49999999999999997e101Initial program 99.2%
Taylor expanded in k around 0 53.6%
*-commutative53.6%
associate-/l*53.6%
Simplified53.6%
pow153.6%
sqrt-unprod53.7%
Applied egg-rr53.7%
unpow153.7%
associate-*r/53.7%
associate-/l*53.7%
*-commutative53.7%
*-commutative53.7%
associate-/l*53.7%
*-commutative53.7%
Simplified53.7%
associate-*r/53.7%
*-commutative53.7%
*-commutative53.7%
sqrt-div75.8%
div-inv75.8%
*-commutative75.8%
inv-pow75.8%
sqrt-pow275.8%
metadata-eval75.8%
*-commutative75.8%
associate-*l*75.8%
Applied egg-rr75.8%
if 1.49999999999999997e101 < k Initial program 100.0%
associate-*l/100.0%
*-lft-identity100.0%
associate-*l*100.0%
div-sub100.0%
metadata-eval100.0%
Simplified100.0%
div-inv100.0%
div-inv100.0%
metadata-eval100.0%
inv-pow100.0%
sqrt-pow2100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in k around 0 2.7%
*-commutative2.7%
*-commutative2.7%
associate-/l*2.7%
Simplified2.7%
sqrt-unprod2.7%
clear-num2.7%
un-div-inv2.7%
Applied egg-rr2.7%
associate-/r/2.7%
*-commutative2.7%
*-commutative2.7%
expm1-log1p-u2.7%
expm1-undefine32.4%
*-commutative32.4%
*-commutative32.4%
associate-/r/32.4%
associate-*r/32.4%
div-inv32.4%
*-commutative32.4%
clear-num32.4%
Applied egg-rr32.4%
sub-neg32.4%
metadata-eval32.4%
+-commutative32.4%
log1p-undefine32.4%
rem-exp-log32.4%
+-commutative32.4%
associate-*r/32.4%
*-commutative32.4%
associate-*r*32.4%
*-commutative32.4%
associate-/l*32.4%
fma-define32.4%
*-lft-identity32.4%
metadata-eval32.4%
associate-/r*32.4%
neg-mul-132.4%
fma-define32.4%
Simplified32.4%
Final simplification61.1%
(FPCore (k n) :precision binary64 (* (pow (* 2.0 (* PI n)) (- 0.5 (* 0.5 k))) (pow k -0.5)))
double code(double k, double n) {
return pow((2.0 * (((double) M_PI) * n)), (0.5 - (0.5 * k))) * pow(k, -0.5);
}
public static double code(double k, double n) {
return Math.pow((2.0 * (Math.PI * n)), (0.5 - (0.5 * k))) * Math.pow(k, -0.5);
}
def code(k, n): return math.pow((2.0 * (math.pi * n)), (0.5 - (0.5 * k))) * math.pow(k, -0.5)
function code(k, n) return Float64((Float64(2.0 * Float64(pi * n)) ^ Float64(0.5 - Float64(0.5 * k))) * (k ^ -0.5)) end
function tmp = code(k, n) tmp = ((2.0 * (pi * n)) ^ (0.5 - (0.5 * k))) * (k ^ -0.5); end
code[k_, n_] := N[(N[Power[N[(2.0 * N[(Pi * n), $MachinePrecision]), $MachinePrecision], N[(0.5 - N[(0.5 * k), $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 - 0.5 \cdot k\right)} \cdot {k}^{-0.5}
\end{array}
Initial program 99.5%
associate-*l/99.4%
*-lft-identity99.4%
associate-*l*99.4%
div-sub99.4%
metadata-eval99.4%
Simplified99.4%
div-inv99.5%
div-inv99.5%
metadata-eval99.5%
inv-pow99.5%
sqrt-pow299.5%
metadata-eval99.5%
Applied egg-rr99.5%
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.4%
*-lft-identity99.4%
associate-*l*99.4%
div-sub99.4%
metadata-eval99.4%
Simplified99.4%
(FPCore (k n) :precision binary64 (* (pow k -0.5) (sqrt (* PI (* 2.0 n)))))
double code(double k, double n) {
return pow(k, -0.5) * sqrt((((double) M_PI) * (2.0 * n)));
}
public static double code(double k, double n) {
return Math.pow(k, -0.5) * Math.sqrt((Math.PI * (2.0 * n)));
}
def code(k, n): return math.pow(k, -0.5) * math.sqrt((math.pi * (2.0 * n)))
function code(k, n) return Float64((k ^ -0.5) * sqrt(Float64(pi * Float64(2.0 * n)))) end
function tmp = code(k, n) tmp = (k ^ -0.5) * sqrt((pi * (2.0 * n))); end
code[k_, n_] := N[(N[Power[k, -0.5], $MachinePrecision] * N[Sqrt[N[(Pi * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{k}^{-0.5} \cdot \sqrt{\pi \cdot \left(2 \cdot n\right)}
\end{array}
Initial program 99.5%
Taylor expanded in k around 0 36.3%
*-commutative36.3%
associate-/l*36.3%
Simplified36.3%
pow136.3%
sqrt-unprod36.4%
Applied egg-rr36.4%
unpow136.4%
associate-*r/36.4%
associate-/l*36.4%
*-commutative36.4%
*-commutative36.4%
associate-/l*36.4%
*-commutative36.4%
Simplified36.4%
associate-*r/36.4%
*-commutative36.4%
*-commutative36.4%
sqrt-div51.0%
div-inv51.0%
*-commutative51.0%
inv-pow51.0%
sqrt-pow251.0%
metadata-eval51.0%
*-commutative51.0%
associate-*l*51.0%
Applied egg-rr51.0%
Final simplification51.0%
(FPCore (k n) :precision binary64 (* (sqrt n) (sqrt (* PI (/ 2.0 k)))))
double code(double k, double n) {
return sqrt(n) * sqrt((((double) M_PI) * (2.0 / k)));
}
public static double code(double k, double n) {
return Math.sqrt(n) * Math.sqrt((Math.PI * (2.0 / k)));
}
def code(k, n): return math.sqrt(n) * math.sqrt((math.pi * (2.0 / k)))
function code(k, n) return Float64(sqrt(n) * sqrt(Float64(pi * Float64(2.0 / k)))) end
function tmp = code(k, n) tmp = sqrt(n) * sqrt((pi * (2.0 / k))); end
code[k_, n_] := N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(Pi * N[(2.0 / k), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{n} \cdot \sqrt{\pi \cdot \frac{2}{k}}
\end{array}
Initial program 99.5%
Taylor expanded in k around 0 36.3%
*-commutative36.3%
associate-/l*36.3%
Simplified36.3%
pow136.3%
sqrt-unprod36.4%
Applied egg-rr36.4%
unpow136.4%
associate-*r/36.4%
associate-/l*36.4%
*-commutative36.4%
*-commutative36.4%
associate-/l*36.4%
*-commutative36.4%
Simplified36.4%
pow1/236.4%
associate-*l*36.3%
unpow-prod-down51.0%
pow1/251.0%
Applied egg-rr51.0%
unpow1/251.0%
Simplified51.0%
(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.5%
associate-*l/99.4%
*-lft-identity99.4%
associate-*l*99.4%
div-sub99.4%
metadata-eval99.4%
Simplified99.4%
div-inv99.5%
div-inv99.5%
metadata-eval99.5%
inv-pow99.5%
sqrt-pow299.5%
metadata-eval99.5%
Applied egg-rr99.5%
Applied egg-rr85.3%
Taylor expanded in k around 0 36.8%
associate-*r*36.8%
*-commutative36.8%
*-commutative36.8%
Simplified36.8%
Final simplification36.8%
(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.5%
associate-*l/99.4%
*-lft-identity99.4%
associate-*l*99.4%
div-sub99.4%
metadata-eval99.4%
Simplified99.4%
div-inv99.5%
div-inv99.5%
metadata-eval99.5%
inv-pow99.5%
sqrt-pow299.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in k around 0 36.3%
*-commutative36.3%
*-commutative36.3%
associate-/l*36.3%
Simplified36.3%
sqrt-unprod36.4%
clear-num36.3%
un-div-inv36.4%
Applied egg-rr36.4%
clear-num36.4%
associate-/r/36.3%
clear-num36.4%
Applied egg-rr36.4%
Final simplification36.4%
herbie shell --seed 2024103
(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))))