Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Gamma function
(section)
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!
== Practical implementations == Unlike many other functions, such as a [[Normal Distribution]], no obvious fast, accurate implementation that is easy to implement for the Gamma Function <math>\Gamma(z)</math> is easily found. Therefore, it is worth investigating potential solutions. For the case that speed is more important than accuracy, published tables for <math>\Gamma(z)</math> are easily found in an Internet search, such as the Online Wiley Library. Such tables may be used with [[linear interpolation]]. Greater accuracy is obtainable with the use of [[Cubic Hermite spline|cubic interpolation]] at the cost of more computational overhead. Since <math>\Gamma(z)</math> tables are usually published for argument values between 1 and 2, the property <math>\Gamma(z+1) = z\ \Gamma(z)</math> may be used to quickly and easily translate all real values <math>z <1 </math> and <math>z>2</math> into the range <math>1\leq z \leq 2</math>, such that only tabulated values of <math>z</math> between 1 and 2 need be used.<ref>{{cite journal|first1=Helmut|last1=Werner|first2=Robert|last2=Collinge|title=Chebyshev approximations to the Gamma Function|journal=Math. Comput.|year=1961|pages=195β197|volume=15|number=74|doi=10.1090/S0025-5718-61-99220-1 |jstor=2004230}}</ref> If interpolation tables are not desirable, then the [[Gamma function#Approximations|Lanczos approximation]] mentioned above works well for 1 to 2 digits of accuracy for small, commonly used values of z. If the Lanczos approximation is not sufficiently accurate, the [[Stirling's approximation#Stirling's formula for the gamma function|Stirling's formula for the Gamma Function]] may be used.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)