GAMR

This function evaluates the reciprocal gamma function.

Function Return Value

GAMR — Function value. (Output)

Required Arguments

X — Argument for which the reciprocal gamma function is desired. (Input)

FORTRAN 90 Interface

Generic: GAMR (X)

Specific: The specific interface names are S_GAMR, D_GAMR, and C_GAMR

FORTRAN 77 Interface

Single: GAMR (X)

Double: The double precision function name is DGAMR.

Complex: The complex name is CGAMR.

Description

The function GAMR computes 1/Γ(z). See GAMMA for the definition of Γ(z).

For (z 0, z must be larger than xmin so that 1/Γ(z) does not underflow, and x must be smaller than xmax so that 1/Γ(z) does not overflow. Symmetric overflow and underflow limits xmin and xmax are obtainable from

 

CALL R9GAML (XMIN, XMAX)

Note that z must not be too far from the real axis because the result will overflow there.

Comments

This function is well behaved near zero and negative integers.

Examples

Example 1

In this example, 1/Γ(1.85) is computed and printed.

 

USE GAMR_INT

USE UMACH_INT

 

IMPLICIT NONE

! Declare variables

INTEGER NOUT

REAL VALUE, X

! Compute

X = 1.85

VALUE = GAMR(X)

! Print the results

CALL UMACH (2, NOUT)

WRITE (NOUT,99999) X, VALUE

99999 FORMAT (' GAMR(', F6.3, ') = ', F6.3)

END

Output

 

GAMR( 1.850) = 1.058

Example 2

In this example, 1/Γ(1.4 + 3i) is computed and printed.

 

USE GAMR_INT

USE UMACH_INT

 

IMPLICIT NONE

! Declare variables

INTEGER NOUT

COMPLEX VALUE, Z

! Compute

Z = (1.4, 3.0)

VALUE = GAMR(Z)

! Print the results

CALL UMACH (2, NOUT)

WRITE (NOUT,99999) Z, VALUE

99999 FORMAT (' GAMR(', F6.3, ',', F6.3, ') = (', F7.3, ',', F7.3, ')')

END

Output

 

GAMR( 1.400, 3.000) = ( -0.303,-16.367)