Chapter 4: Gamma Function and Related Functions

PSI1

This function evaluates the second derivative of the log gamma function.

Function Return Value

PSI1 — Function value.   (Output)

Required Arguments

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

 

Generic:                              PSI1 (X)

Specific:                             The specific interface names are S_PSI1 and D_PSI1.

Description

The psi1 function, also called the trigamma function, is defined to be

See GAMMA for the definition of Γ(x).

The argument x must not be exactly zero or a negative integer, or  is undefined. Also, x must not be too close to a negative integer such that the accuracy of the result is less than half precision.

Comments

Informational error

Type Code

3         2                  Result of PSI1(X) is accurate to less than one-half precision because X is too near a negative integer.

Example

In this example,  is computed and printed.

 

      USE PSI1_INT

      USE UMACH_INT

 

      IMPLICIT   NONE

!                                 Declare variables

      INTEGER    NOUT

      REAL       VALUE, X

!                                 Compute

      X     = 1.915

      VALUE = PSI1(X)

!                                 Print the results

      CALL UMACH (2, NOUT)

      WRITE (NOUT,99999) X, VALUE

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

      END

Output

 

PSI1( 1.915) =  0.681

 



http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260