The Gamma Function
ln |gamma|This program lets you calculate the gamma function of a number and the natural log of gamma. The program is designed to recognize out-of-range results and to compute
instead of gamma when gamma is too large.
Introduction
The gamma function is defined by the improper integral:G = gamma(x) = ∫tx-1e-1dt over the range 0 to ∞ (infinity)
which converges for noninteger values of x < 1 and all values of x > 0. The gamma function is related to the factorial function: gamma( x+1 ) = x!.
The approximate input range of gamma is: -70.064 ≤ x ≤ 70.957, where x is not an integer less than 1.
Although the calculator cannot display gamma for results whose exponents exceed 99, you can still determine the magnitude of gamma from the ln |gamma| using the laws of logarithms. The mantissa of gamma is
Antilog( Frac( lnG / ln10 ) )
and the exponent of scientific notation for gamma is
Intg( lnG / ln10 ).
Reference
Handbook of Mathematical Functions, M. Abramowitz and I. A. Stegun, National Bureau of Standards, 1972.Using the Program
To use the Gamma Function program:- Select { GAM } from the
MATHEMATICS menu.
The calculator displays the GAMMA FUNCTION menu.
{ G } - Calculates the gamma function of the displayed value or the natural log of gamma if the result is too large.
{ lnG } - Calculates the natural log of the gamma function of the displayed value. - Enter the value and press the applicable key.
The program displays the result. For example, with a value of 0.5 entered in the display, pressing { G } will produce the following displayed result:
- Repeat step 2 for other values.
☚ Back