GAMPR

This function evaluates the gamma probability density function.

Function Return Value

GAMPR — Function value, the value of the probability density function. (Output)

Required Arguments

X — Argument for which the gamma probability density function is to be evaluated. (Input)

A — The shape parameter of the gamma distribution. (Input)
This parameter must be positive.

FORTRAN 90 Interface

Generic: GAMPR (X, A)

Specific: The specific interface names are S_GAMPR and D_GAMPR.

FORTRAN 77 Interface

Single: GAMPR (X, A)

Double: The double precision name is DGAMPR.

Description

The function GAMPR evaluates the gamma probability density function, defined as

 

Example

In this example, we evaluate the probability function at X = 4.0, A = 5.0.

 

USE UMACH_INT

USE GAMPR_INT

IMPLICIT NONE

INTEGER NOUT

REAL X, A, PR

CALL UMACH(2, NOUT)

X = 4.0

A = 5.0

PR = GAMPR(X, A)

WRITE (NOUT, 99999) X, A, PR

99999 FORMAT (' GAMPR(', F4.2, ', ', F4.2, ') = ', F6.4)

END

Output

 

GAMPR(4.00, 5.00) = 0.1954