This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

The Lanczos Approximation for the Γ\Gamma-Function with Complex Coefficients

William Rea
Christchurch, New Zealand
New Zealand
email: [email protected]
Abstract

We examined the properties of the coefficients of the Lanczos (1964) approximation of the Γ\Gamma-function with complex value of the free parameter together with the convergence properties of the approximation when using these coefficients. We report that for fixed real parts of the free parameter that using complex coefficients both increases the computational cost of the Lanczos approximation while drecreasing the accuracy. We conclude that in practical applications of numerical evaluation of the Γ\Gamma-function only coefficients generated with real values of the free parameter should be used..

1 Introduction

The Γ\Gamma-function, defined by

Γ(z)=0tz1et𝑑t\Gamma(z)=\int_{0}^{\infty}t^{z-1}e^{-t}dt (1)

was introduced by Euler as a solution to the “interpolation” problem of defining the factorial function for non-integer values. Equation (1) has the desired property that Γ(n+1)=n!\Gamma(n+1)=n!. The uniqueness of this definition was proved by Bohr and Mollerup (1922) and a second proof attributed to H. Wielandt is discussed by Remmert (1996) and included in the textbook by Freitag and Busam (2005),

In the form of Equation (1) it is defined in the complex plane for e(z)>0\mathcal{R}e(z)>0 and can be extended to the left half-plane, among other several other methods, through the use of the Euler reflection formula

Γ(z)Γ(1z)=πsinπz.\Gamma(z)\Gamma(1-z)=\frac{\pi}{\sin\pi z}. (2)

The Γ\Gamma-function has found wide application in pure and applied mathematics, statistics and the physical sciences. Exact values for the Γ\Gamma-function can be found for positive integer (zero and the negative integers are simple poles) and for half integer values of zz. Apart from those values, the Γ\Gamma-function must be evaluated using numerical methods. To this end a number of approximations and asymptotic series have been developed. The earliest being Stirling’s approximation; for integer nn

n!2πnnnen=2πn(ne)n.n!\approx\sqrt{2\pi n}n^{n}e^{-n}=\sqrt{2\pi n}\left(\frac{n}{e}\right)^{n}.

A large number of proofs of Stirling’s approximation and closely related formulas are available, see, for example, Aissen (1954), Feller (1967), Spira (1971), Namias (1986), Marsaglia and Marsaglia (1990), Deeba and Rodriguez (1991), Schuster (2001), Michel (2002), Dutkay et al. (2013), Lou (2014), and Neuschel (2014).

There are also a number of series expansions available such as Stirling’s asymptotic series

n!=(ne)n2πnexp(112n1360n3+11260n5).n!=\left(\frac{n}{e}\right)^{n}\sqrt{2\pi n}\exp\left(\frac{1}{12n}-\frac{1}{360n^{3}}+\frac{1}{1260n^{5}}-\dots\right).

There are some proofs which only require elementary methods such as that of Mermin (1984), Namias (1986), Diaconis and Freedman (1986), Patin (1989) and Marsaglia and Marsaglia (1990).

In addition there are series methods due to Spira (1971), Spouge (1994), and Schmelzer and Trefethen (2007). Among these other series Lanczos (1964) derived an expansion for the numerical evaluation of the Γ\Gamma-function which was popularized to some extent by its inclusion in Press et al. (1997) and which was studied in some detail by Pugh (2004). The expansion has two notable features; it is convergent rather than an asymptotic expansion and it has a free parameter (denoted by γ\gamma by Lanczos (1964) but by rr by Pugh (2004), we will use rr in this paper) which affects the rate of convergence of the approximation. While it is known that the free parameter can be complex, to the best of this author’s knowledge the convergence properties of a complex expansion have not been studied. Godfrey (2001) studied the convergence properties of the expansion for real values of rr and implemented his best choice of coefficients in Matlab (MATLAB, 2019) using 15 terms and giving an approximation that was accurate to 15 significant digits along the real axis and 13 significant digits elsewhere.

The Lanczos expansion,, which is for Γ(z+1)\Gamma(z+1) rather than Γ(z)\Gamma(z), can be written

Γ(z+1)=2π(z+r+12)z+12e(z+r+12)[a0(r)2+zz+1a1(r)+(z1)z(z+2)(z+1)a2(r)+]\Gamma(z+1)=\sqrt{2\pi}\left(z+r+\frac{1}{2}\right)^{z+\frac{1}{2}}e^{-\left(z+r+\frac{1}{2}\right)}\\ \left[\frac{a_{0}(r)}{2}+\frac{z}{z+1}a_{1}(r)+\frac{(z-1)z}{(z+2)(z+1)}a_{2}(r)+\cdots\right] (3)

where the ak(r)a_{k}(r) are the coefficients and rr is the free parameter.

The key to obtaining the ak(r)a_{k}(r) is to note that the Γ\Gamma-function has known values at the integers and that for positive integers the expansion (3) terminates, allowing the ak(r)a_{k}(r) to be determined recursively. Pugh (2004) investigated several methods of obtaining the ak(r)a_{k}(r) and reported the recursive methods worked well in practice.

In (3) if z=0z=0 then Γ(1)=1\Gamma(1)=1 and the series terminates after the first term. Thus

1\displaystyle 1 =2π(r+12)1/2e(r+12)a0(r)2.\displaystyle=\sqrt{2\pi}\left(r+\frac{1}{2}\right)^{1/2}e^{-\left(r+\frac{1}{2}\right)}\frac{a_{0}(r)}{2}.
Solving for a0(r)a_{0}(r) we obtain
a0(r)\displaystyle a_{0}(r) =2eπ(r+12)er.\displaystyle=\sqrt{\frac{2e}{\pi(r+\frac{1}{2})}}e^{r}. (4)

Having obtained a0(r)a_{0}(r) we then set z=1z=1 so that Γ(2)=1\Gamma(2)=1 and (3) now terminates after the second term allowing us to find a1(r)a_{1}(r). By successively setting z=2,3,4z=2,3,4\ldots we can calculate as many of the ak(r)a_{k}(r) as required.

On a practical matter of finding the ak(r)a_{k}(r) it is useful to set

Fr(z)\displaystyle F_{r}(z) =Γ(z+1)ez+r+1/22π(z+r+1/2)z+1/2.\displaystyle=\frac{\Gamma(z+1)e^{z+r+1/2}}{\sqrt{2\pi}\left(z+r+1/2\right)^{z+1/2}}. (5)
Then
a1\displaystyle a_{1} =(Fr(1)a02)21\displaystyle=\left(F_{r}(1)-\frac{a_{0}}{2}\right)\frac{2}{1} (6)
a2\displaystyle a_{2} =((Fr(2)a02)32a1)41\displaystyle=\left(\left(F_{r}(2)-\frac{a_{0}}{2}\right)\frac{3}{2}-a_{1}\right)\frac{4}{1} (7)
The general (n3n\geq 3) recursion formula is
an(r)\displaystyle a_{n}(r) =((((Fr(n)a02)n+1na1)n+2n1a2)n+3n2an1)2n1.\displaystyle=\left(\left(\left(\left(F_{r}(n)-\frac{a_{0}}{2}\right)\frac{n+1}{n}-a_{1}\right)\frac{n+2}{n-1}-a_{2}\right)\frac{n+3}{n-2}-\cdots-a_{n-1}\right)\frac{2n}{1}. (8)

The final equation is Pugh (2004) Equation (6.4).

Having found some ak(r)a_{k}(r) values they are substituted into the expansion (3) and desired approximations of Γ(z+1)\Gamma(z+1) can be obtained, values with e(z)<0\mathcal{R}e(z)<0 can be obtained by combining the Lanczos approximation with the Euler reflection formula, Equation (2).

In the remainder of this paper Section (2) investigates some of the properties of the Lanczos coefficients with complex values of the free parameter, Section (3) reports on the numerical performance of series with complex coefficients, Section (4) presents our conclusions while Appendix (A) presents some supplementary materials.

2 Properties of the Complex ak(r)a_{k}(r)

The formulas (4) through (8) allow us to calculate the expansion coefficients with complex rr. All numerical values and graphics presented here were obtained with custom written Matlab (MATLAB, 2019) code. The code was verified using published values of the ak(r)a_{k}(r) for real rr in Lanczos (1964) and Pugh (2004) and then, without any further alteration of the code, rr was allowed to be complex and the required coefficients calculated.

Figures (1) through (5) present five different views of the a0(r)a_{0}(r) coefficient for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi. While we explored values of rr with different real parts (e(r)=1,3,,13\mathcal{R}e(r)=1,3,\ldots,13), the behaviour of the coefficients were similar in all cases, the main change being their magnitudes.

In the recursive calculation of the ak(r)a_{k}(r) only integer values of zz are used so we denote these by n=1,2,3,n=1,2,3,\ldots. The free parameter enters at two points. In the numerator of the Fr(z)F_{r}(z), Equation (5), with n=1,2,3,n=1,2,3,\ldots, has the term en+r+1/2e^{n+r+1/2}. Writing r=rx+iryr=r_{x}+ir_{y} the real part of the exponent is n+rx+1/2n+r_{x}+1/2 while the imaginary part is iryir_{y}. Holding the real part constant and allowing m(r)\mathcal{I}m(r) to change makes the coefficients “spin” in the complex plane, examples can be seen in Figures (1), (4) and (5).

Refer to caption
Figure 1: The complex values of the a0(r)a_{0}(r) coefficient of the Lanczos expantion with r=1+iryr=1+ir_{y} where 20πry20π-20\pi\leq r_{y}\leq 20\pi.

The other place rr enters the calculation of the ak(r)a_{k}(r) is in the denominator of Fr(z)F_{r}(z). This is what causes the “tappering off” seen in Figure (1) through (3) and the gradual descent of the path of the ak(r)a_{k}(r) on the Riemann sphere, see Figure (5). If

r\displaystyle r =rx+iry\displaystyle=r_{x}+ir_{y}
We can rewrite this in polar form
r\displaystyle r =Reiθ\displaystyle=Re^{i\theta}
where
R\displaystyle R =rx2+ry2\displaystyle=\sqrt{r_{x}^{2}+r_{y}^{2}}
θ\displaystyle\theta =tan1(ryrx).\displaystyle=\tan^{-1}\left(\frac{r_{y}}{r_{x}}\right).

If rxr_{x} is fixed increasing |ry||r_{y}| increases RR causing the tapper. Asympotitically the real and imaginary parts of a0(r)a_{0}(r) decay as 1/ry1/\sqrt{r_{y}}.

Refer to caption
Figure 2: The real values of the a0(r)a_{0}(r) coefficient of the Lanczos expantion with r=1+iryr=1+ir_{y} where 20πry20π-20\pi\leq r_{y}\leq 20\pi.

Figures (2) and (3) suggest that there are points for fixed rxr_{x} (rx=1r_{x}=1 in the Figures) for which the a0(r)a_{0}(r) will be purely real or purely imaginary. We can derive conditions under which these cases occur and show that there are an infinite number of such coefficients.

Refer to caption
Figure 3: The imaginary values of the a0(r)a_{0}(r) coefficient of the Lanczos expantion with r=1+iryr=1+ir_{y} where 20πry20π-20\pi\leq r_{y}\leq 20\pi.

Using Equation (4), if a0(r)a_{0}(r) is purely imaginary then it has the form a0(r)=iva_{0}(r)=iv. Thus

iv\displaystyle iv =2eπ(r+12)er\displaystyle=\sqrt{\frac{2e}{\pi(r+\frac{1}{2})}}e^{r}
v2\displaystyle-v^{2} =2eπ(r+12)e2r.\displaystyle=\frac{2e}{\pi(r+\frac{1}{2})}e^{2r}.
First, splitting rr into its real and imaginary parts we have
v2\displaystyle-v^{2} =2eπ((rx+12)+iry)e2rx+i2ry.\displaystyle=\frac{2e}{\pi\left((r_{x}+\frac{1}{2})+ir_{y}\right)}e^{2r_{x}+i2r_{y}}.
Next, we proceed to split this into its real and imaginary parts
v2\displaystyle-v^{2} =2e2rx+1π((rx+12)2+ry2)((rx+12)iry)(cos2ry+isin2ry)\displaystyle=\frac{2e^{2r_{x}+1}}{\pi\left(\left(r_{x}+\frac{1}{2}\right)^{2}+r_{y}^{2}\right)}\left(\left(r_{x}+\frac{1}{2}\right)-ir_{y}\right)\left(\cos 2r_{y}+i\sin 2r_{y}\right)

Thus we have

v2=2e2rx+1π((rx+12)2+ry2)[((rx+12)cos2ry+rysin2ry)+i((rx+12)sin2ryrycos2ry)].-v^{2}=\frac{2e^{2r_{x}+1}}{\pi\left(\left(r_{x}+\frac{1}{2}\right)^{2}+r_{y}^{2}\right)}\Bigg{[}\left(\left(r_{x}+\frac{1}{2}\right)\cos 2r_{y}+r_{y}\sin 2r_{y}\right)\\ +i\left(\left(r_{x}+\frac{1}{2}\right)\sin 2r_{y}-r_{y}\cos 2r_{y}\right)\Bigg{]}.

From this we neglect the sign of the leading fraction because it is always positive. This leaves us with two conditions for the a0(r)a_{0}(r) to be purely imaginary. The first is that real part must be negative, that is

(rx+12)cos2ry+rysin2ry\displaystyle\left(r_{x}+\frac{1}{2}\right)\cos 2r_{y}+r_{y}\sin 2r_{y} <0\displaystyle<0
or
tan2ry<rx+1/2ry.\displaystyle\tan 2r_{y}<-\frac{r_{x}+1/2}{r_{y}}. (9)
Secondly, we require that the imaginary part is zero
(rx+12)sin2ryrycos2ry\displaystyle\left(r_{x}+\frac{1}{2}\right)\sin 2r_{y}-r_{y}\cos 2r_{y} =0.\displaystyle=0.
From this second condition we require
tan2ry\displaystyle\tan 2r_{y} =ryrx+1/2.\displaystyle=\frac{r_{y}}{r_{x}+1/2}. (10)
For the a0(r)a_{0}(r) to be purely real the condition on the imaginary part (Equation 10) is unchanged and in place of Equation (9) we require
(rx+12)cos2ry+rysin2ry\displaystyle\left(r_{x}+\frac{1}{2}\right)\cos 2r_{y}+r_{y}\sin 2r_{y} >0.\displaystyle>0.
or
tan2ry<rx+1/2ry.\displaystyle\tan 2r_{y}<-\frac{r_{x}+1/2}{r_{y}}. (11)
Refer to caption
Figure 4: The real and imaginary values of the a0(r)a_{0}(r) coefficient of the Lanczos expantion with r=1+iryr=1+ir_{y} where 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 5: The coefficient a0(r)a_{0}(r) for r=1+iryr=1+ir_{y} for 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 6: A plot of the magnitudes of the first 11 coefficients for r=1+iryr=1+ir_{y} for 20πry20π-20\pi\leq r_{y}\leq 20\pi.

Pragmatically, to find the values of rr for which the a0(r)a_{0}(r) are purely real or imaginary requires solving Equation (10) numerically and then checking the conditions in Equations (9) and (11).

2.1 The Magnitudes of the ak(r)a_{k}(r)

Numerical work by Pugh (2004) showed that the magnitudes of the Lanczos coefficients decreased rapidly for increasing kk, motivating us to examine this property in the complex case. Figure (6) presents the magnitudes of the first 11 Lanczos coefficients for r=1+iryr=1+ir_{y} with 20πy20π-20\pi\leq y\leq 20\pi. It is clear from this Figure that the coefficients with rr purely real are turning points (maximum, minimum or local minimum) in the trajectory of the ak(r)a_{k}(r) through complex space. We observed this phenomena for all real values of rr we examined, e(r)=1,3,5,7,9,11,13\mathcal{R}e(r)=1,3,5,7,9,11,13.

Refer to caption
Figure 7: A plot of the locations in the complex plane of the first 10 Lanczos coefficients for r=1+20πir=1+20\pi i.

Further, as |m(r)||\mathcal{I}m(r)| increases the magnitude of the coefficients converge. This is illustrated in Figure (7) in which we present the location in the complex plane of the first ten Lanczos coefficients with r=1+20πir=1+20\pi ii. Their numerical values are presented in Table (1). We used these in one set of numerical evaluations discussed in Section (3) below. Both Lanczos (1964) and Pugh (2004) noted that for real rr the signs of the Lanczos coefficients alternate with ak(r)>0a_{k}(r)>0 for kk even and ak(r)<0a_{k}(r)<0 for kk odd. Although we did not do extensive numerical computations to large values of kk, in the work we did do, we never found two successive ak(r)a_{k}(r) in the same quadrant.

Coefficient Numerical Value
a0a_{0} 0.32272800 - 0.31511539i
a1a_{1} -0.33566576 + 0.30053412i
a2a_{2} 0.37045027 - 0.25375121i
a3a_{3} -0.41388748 + 0.16751781i
a4a_{4} 0.44150035 - 0.03647994i
a5a_{5} -0.41823596 - 0.13196358i
a6a_{6} 0.30817352 + 0.30446707i
a7a_{7} -0.09837046 - 0.41551337i
a8a_{8} -0.16793546 + 0.38494230i
a9a_{9} 0.37447472 - 0.172296311i
Table 1: The numerical values of the first ten Lanczos coeffients with free parameter r=1+i20πr=1+i20\pi, corresponding to the those in Figure (7). Their performance in the approximation is discussed briefly in Section (3).

3 Numerical Evaluation

It is obvious that using a Lanczos approximation with complex rr increases the computational cost of calculating the Γ\Gamma-function when the same number of coefficients are used. Thus to use complex coefficients requires a compelling case that there are significant advantages in the convergence rate and/or accuracy of the approximation compared to real coefficients. In this section we examine whether such a case can be made.

In all cases we used 10 coefficients in the approximation. Figures (8) through (11) present the results, we discuss how the data in each Figure was generated and comment on its significance.

Refer to caption
Figure 8: The absolute error of the Lanczos Γ\Gamma approximation for z+1z+1 between 1.5 and 12 using 10 terms with r=1+iryr=1+ir_{y} with 0ry2π0\leq r_{y}\leq 2\pi.

We generated 13 sets of 10 coefficients using the recursive method described above by setting r=1+inπ/6r=1+in\pi/6 where n=0,1,,12n=0,1,\ldots,12. In Figures (8) and (9) the imaginary part of rr is presented on the axis label Im(r)Im(r). We generated 22 values of z+1=1.5,2.0,2.5,,12z+1=1.5,2.0,2.5,\ldots,12 for which exact values could be calculated. These were obtained for integer values from the factorial property, namely Γ(n+1)=n!\Gamma(n+1)=n! and for half integer values from the functional equation

Γ(z+1)=zΓ(z)\Gamma(z+1)=z\Gamma(z)

coupled with the value Γ(1/2)=π\Gamma(1/2)=\sqrt{\pi}.

Figure (8) presents the absolute value of the error while Figure (9) presents the relative error, that is the absoluate error is divided by the exact value. In both cases it is clear that the Lanczos coefficients generated by real rr performed better. The absolute error is never large (less than 3 for 11!3.9×10711!\approx 3.9\times 10^{7} but largest error occurs for coefficients generated with r=1+i2πr=1+i2\pi.

Refer to caption
Figure 9: The relative error of the Lanczos Γ\Gamma approximation for z+1z+1 between 1.5 and 12 using 10 terms with r=1+iryr=1+ir_{y} with 0ry2π0\leq r_{y}\leq 2\pi. The top of the graph is truncated at an error of one part in 10710^{7}.

The relative error presented in Figure (9) is more informative. The vertical axis is truncated at an error of 10710^{-7} in order to better see the relative error at the half-integer values.. It clear that in all cases the relative error is indistiquishable from zero for integer values up to z+1=10z+1=10 for all values ofrr. This is because they were used to generate the coefficients. However, the half integer values of z+1z+1 show increasing relative errors as the imaginary part increases from 0 to 2π2\pi. Somewhat similar, once we progress beyond the integer values of z+1z+1 which we used to generate the coefficients, i.e. z+1=10z+1=10, the relative error builds rapidly with increasing imaginary part of rr. At least on the scale used in the Figure the relative error for the coefficients are indistinquiable from zero for real rr.

Refer to caption
Figure 10: The absolute error of the Lanczos Γ\Gamma approximation for z+1=6+iyz+1=6+iy with 0y2π0\leq y\leq 2\pi using 10 terms with r=1+iryr=1+ir_{y} with 0ry2π0\leq r_{y}\leq 2\pi.
Refer to caption
Figure 11: The relative error of the Lanczos Γ\Gamma approximation for z+1=6+iyz+1=6+iy with 0y2π0\leq y\leq 2\pi using 10 terms with r=1+iryr=1+ir_{y} with 0ry2π0\leq r_{y}\leq 2\pi.

For Figures (10) and (11), using the same coefficients as above, we considered the performance of the approxmation for complex values of z+1z+1. We set z+1=6+nπi/12z+1=6+n\pi i/12 for n=0,1,,24n=0,1,\ldots,24. To find comparison values we used the Godfrey (2001) implementation discussed above. For both the absolute and relative error cases, the Lanczos approximation performance deteriorated as the imaginary part of z+1z+1 increased and as the imaginary part of rr increased together.

Figure (6) suggests that as the imagary part of rr increases all coefficients converge to the same magnitude. For the coefficients displayed in Figure (7), i.e. for r=1+20πir=1+20\pi i, we tested its performance against the Godfrey (2001) implementation. We do not present detailed results here, suffice to say that as the imaginary part of z+1z+1 increased the relative error increased very rapidly.

4 Conclusions

We explored the possibility that complex values of the free parameter rr in the Lanczos (1964) approximation for the Γ\Gamma-function could improve the rate of convergence of the approximation. However, we must conclude that there is no advantage to using complex values of rr, in fact, it appears uniformly detrimental. The real values of rr for the values we explored uniformly gave the lowest relative error when compared with exact values of the Γ\Gamma-function at integer and half integer values. Further, Lanczos coefficients generated by real values of rr also uniformly gave the lowest relative error for complex values of the zz in Γ(z+1)\Gamma(z+1).

Unless there are purely mathematical reasons for further studying the properties of complex Lanczos coefficients they appears to be a dead end in applied numerical analysis.

References

  • Aissen (1954) Aissen, M. I. (1954). Some Remarks on Stirling’s Formula. The American Mathematical Monthly 61(10), 687–691.
  • Bohr and Mollerup (1922) Bohr, H. and J. Mollerup (1922). Laereborg i Matematisk Analyse, Volume III. J. Gjellerup, Kopenhagen.
  • Deeba and Rodriguez (1991) Deeba, E. Y. and D. M. Rodriguez (1991). Stirling’s Series and Bernoulli Numbers. The American Mathematical Monthly 98(5), 423–326.
  • Diaconis and Freedman (1986) Diaconis, P. and D. Freedman (1986). An Elementary Proof of Stirling’s Formula. The American Mathematical Monthly 93(2), 123–125.
  • Dutkay et al. (2013) Dutkay, D. E., C. P. Niculescu, and F. Popovici (2013). Stirling’s Formula and its Extension for the Gamma Function. The American Mathematical Monthly 120(8), 737–740.
  • Feller (1967) Feller, W. (1967). A Direct Proof of Stirling’s Formula. The American Mathematical Monthly 74(10), 1223–1225.
  • Freitag and Busam (2005) Freitag, E. and R. Busam (2005). Complex Analysis. Springer.
  • Godfrey (2001) Godfrey, P. (2001). A Note on the Computation of the Convergent Lanczos Complex Gamma Approximations. http://my.fit.edu/ gabdo/paulbio.html.
  • Lanczos (1964) Lanczos, C. (1964). A Precision Approximation of the Gamma Function. Journal of the Society for Industrial and Applied Mathematics: Series B, Numerical Analysis 1, 86–96.
  • Lou (2014) Lou, H. (2014). A Short Proof of Stirling’s Formula. The American Mathematical Monthly 121(2), 154–157.
  • Marsaglia and Marsaglia (1990) Marsaglia, G. and J. C. W. Marsaglia (1990). A New Derivation of Stirling’s Approximation to n! The American Mathematical Monthly 97(9), 826–829.
  • MATLAB (2019) MATLAB (2019). version 9.6.0.1072779 (R2019a). Natick, Massachusetts: The MathWorks Inc.
  • Mermin (1984) Mermin, N. D. (1984). Stirling’s formula! American Journal of Physics 52(4), 362–365.
  • Michel (2002) Michel, R. (2002). On Stirling’s Formula. The American Mathematical Monthly 109(4), 388–390.
  • Namias (1986) Namias, V. (1986). A Simple Derivation of Stirling’s Asymptotic Series! The American Mathematical Monthly 93(1), 25–29.
  • Neuschel (2014) Neuschel, T. (2014). A New Proof of Stirling’s Formula. The American Mathematical Monthly 121(4), 350–352.
  • Patin (1989) Patin, J. M. (1989). A Very Short Proof of Stirling’s Formula. The American Mathematical Monthly 96(1), 41–42.
  • Press et al. (1997) Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery (1997). Numerical Recipes. Cambridge University Press.
  • Pugh (2004) Pugh, G. R. (2004). An Analysis of the Lanczos Gamma Approximation. Ph.D. Thesis, The University of British Columbia.
  • Remmert (1996) Remmert, R. (1996). Wielandt’s Theorem About the Γ\Gamma-Function. The American Mathematical Monthly 103(3), 214–220.
  • Schmelzer and Trefethen (2007) Schmelzer, T. and L. N. Trefethen (2007). Computing the Gamma Function Using Contour Integrals and Rational Approximations. SIAM Journal on Numerical Analysis 45(2), 558–571.
  • Schuster (2001) Schuster, W. (2001). Improving Stirling’s Formula. Archiv der Mathematik 77, 170–176.
  • Spira (1971) Spira, R. (1971). Calculation of the Gamma Function by Stirling’s Formula. Mathematics of Computation 25(114), 317–322.
  • Spouge (1994) Spouge, J. L. (1994). Computation of the Gamma, Digamma and Trigamma Functions. SIAM Journal on Numerical Analysis 31(3), 931–944.

Appendix A Plots of Coefficients 0 through 10

A.1 Real and Imaginary Parts of the Coefficients

Refer to caption
Figure 12: Four displays of the real and imaginary parts for coefficient a0(r)a_{0}(r) for r=1+iryr=1+ir_{y} for 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 13: Four displays of the real and imaginary parts for coefficient a1(r)a_{1}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 14: Four displays of the real and imaginary parts for coefficient a2(r)a_{2}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 15: Four displays of the real and imaginary parts for coefficient a3(r)a_{3}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 16: Four displays of the real and imaginary parts for coefficient a4(r)a_{4}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 17: Four displays of the real and imaginary parts for coefficient a5(r)a_{5}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 18: Four displays of the real and imaginary parts for coefficient a6(r)a_{6}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 19: Four displays of the real and imaginary parts for coefficient a7(r)a_{7}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 20: Four displays of the real and imaginary parts for coefficient a8(r)a_{8}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 21: Four displays of the real and imaginary parts for coefficient a9(r)a_{9}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.
Refer to caption
Figure 22: Four displays of the real and imaginary parts for coefficient a10(r)a_{10}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi.

A.2 Coefficients on the Riemann Sphere

Refer to caption
Figure 23: The coefficient a1(r)a_{1}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 24: The coefficient a2(r)a_{2}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 25: The coefficient a3(r)a_{3}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 26: The coefficient a4(r)a_{4}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 27: The coefficient a5(r)a_{5}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 28: The coefficient a6(r)a_{6}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 29: The coefficient a7(r)a_{7}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere
Refer to caption
Figure 30: The coefficient a8(r)a_{8}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 31: The coefficient a9(r)a_{9}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.
Refer to caption
Figure 32: The coefficient a10(r)a_{10}(r) for r=1+iryr=1+ir_{y} with 20πry20π-20\pi\leq r_{y}\leq 20\pi plotted on the Riemann sphere.

A.3 Magntitudes of the Coefficients

Refer to caption
Figure 33: A plot of the magnitudes of the first 11 coefficients for r=3+iryr=3+ir_{y} with 40πry40π-40\pi\leq r_{y}\leq 40\pi.
Refer to caption
Figure 34: A plot of the magnitudes of the first 11 coefficients for r=5+iryr=5+ir_{y} with 40πry40π-40\pi\leq r_{y}\leq 40\pi.
Refer to caption
Figure 35: A plot of the magnitudes of the first 11 coefficients for r=7+iryr=7+ir_{y} with 40πry40π-40\pi\leq r_{y}\leq 40\pi.
Refer to caption
Figure 36: A plot of the magnitudes of the first 11 coefficients for r=9+iryr=9+ir_{y} with 40πry40π-40\pi\leq r_{y}\leq 40\pi.
Refer to caption
Figure 37: A plot of the magnitudes of the first 11 coefficients for r=11+iryr=11+ir_{y} with 40πry40π-40\pi\leq r_{y}\leq 40\pi.