Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Gamma function
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Approximations == [[File:Mplwp factorial gamma stirling.svg|thumb|right|upright=1.35|Comparison of the gamma function (blue line) with the factorial (blue dots) and Stirling's approximation (red line)]] Complex values of the gamma function can be approximated using [[Stirling's approximation]] or the [[Lanczos approximation]], <math display="block">\Gamma(z) \sim \sqrt{2\pi}z^{z-1/2}e^{-z}\quad\hbox{as }z\to\infty\hbox{ in } \left|\arg(z)\right|<\pi.</math> This is precise in the sense that the ratio of the approximation to the true value approaches 1 in the limit as {{math|{{abs|''z''}}}} goes to infinity. The gamma function can be computed to fixed precision for <math>\operatorname{Re} (z) \in [1, 2]</math> by applying [[integration by parts]] to Euler's integral. For any positive number {{mvar|x}} the gamma function can be written <math display="block">\begin{align} \Gamma(z) &= \int_0^x e^{-t} t^z \, \frac{dt}{t} + \int_x^\infty e^{-t} t^z\, \frac{dt}{t} \\ &= x^z e^{-x} \sum_{n=0}^\infty \frac{x^n}{z(z+1) \cdots (z+n)} + \int_x^\infty e^{-t} t^z \, \frac{dt}{t}. \end{align}</math> When {{math|Re(''z'') ∈ [1,2]}} and <math>x \geq 1</math>, the absolute value of the last integral is smaller than <math>(x + 1)e^{-x}</math>. By choosing a large enough <math>x</math>, this last expression can be made smaller than <math>2^{-N}</math> for any desired value <math>N</math>. Thus, the gamma function can be evaluated to <math>N</math> bits of precision with the above series. A fast algorithm for calculation of the Euler gamma function for any algebraic argument (including rational) was constructed by E.A. Karatsuba.<ref>E.A. Karatsuba, Fast evaluation of transcendental functions. Probl. Inf. Transm. Vol.27, No.4, pp. 339–360 (1991).</ref><ref>E.A. Karatsuba, On a new method for fast evaluation of transcendental functions. Russ. Math. Surv. Vol.46, No.2, pp. 246–247 (1991).</ref><ref>E.A. Karatsuba "[http://www.ccas.ru/personal/karatsuba/algen.htm Fast Algorithms and the FEE Method]".</ref> For arguments that are integer multiples of {{math|{{sfrac|1|24}}}}, the gamma function can also be evaluated quickly using [[arithmetic–geometric mean]] iterations (see [[particular values of the gamma function]]).<ref>{{cite journal |last1=Borwein |first1=J. M. |last2=Zucker |first2=I. J. |title=Fast evaluation of the gamma function for small rational fractions using complete elliptic integrals of the first kind |journal=IMA Journal of Numerical Analysis |date=1992 |volume=12 |issue=4 |pages=519–526 |doi=10.1093/IMANUM/12.4.519}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Gamma function
(section)
Add topic