\chapter{Stirling Asymptotics}

\section{Factorial and Gamma Function}

The factorial and the Gamma function are related by
\[
\Gamma(z+1)=z!.
\]

\section{Logarithmic Gamma Function}

For complex \(z\), \(\mathrm{LoGamma}(z)\) denotes the principal branch
of \(\log\Gamma(z)\).

\section{Stirling Expansion}

For large \(|z|\) in a sector excluding the negative real axis,
\[
\Gamma(z) \sim
\sqrt{2\pi}\, z^{z-\frac12} e^{-z}
\sum_{k=0}^{\infty} \frac{g_k}{z^k}.
\]

\section{Restricted and Sectorial Asymptotics}

The asymptotic expansion above is sectorial and non-uniform
near the negative real axis.

\section{Agreement}

The agreement function
\[
a(z) = -\log_{10}
\left(
\frac{|F(z)-A(z)|}{|F(z)|+|A(z)|}
\right)
\]
estimates the number of significant decimal digits
provided by the approximation \(A\).

