00001 *DECK DLGAMS 00002 SUBROUTINE DLGAMS (X, DLGAM, SGNGAM) 00003 C***BEGIN PROLOGUE DLGAMS 00004 C***PURPOSE Compute the logarithm of the absolute value of the Gamma 00005 C function. 00006 C***LIBRARY SLATEC (FNLIB) 00007 C***CATEGORY C7A 00008 C***TYPE DOUBLE PRECISION (ALGAMS-S, DLGAMS-D) 00009 C***KEYWORDS ABSOLUTE VALUE OF THE LOGARITHM OF THE GAMMA FUNCTION, 00010 C FNLIB, SPECIAL FUNCTIONS 00011 C***AUTHOR Fullerton, W., (LANL) 00012 C***DESCRIPTION 00013 C 00014 C DLGAMS(X,DLGAM,SGNGAM) calculates the double precision natural 00015 C logarithm of the absolute value of the Gamma function for 00016 C double precision argument X and stores the result in double 00017 C precision argument DLGAM. 00018 C 00019 C***REFERENCES (NONE) 00020 C***ROUTINES CALLED DLNGAM 00021 C***REVISION HISTORY (YYMMDD) 00022 C 770701 DATE WRITTEN 00023 C 890531 Changed all specific intrinsics to generic. (WRB) 00024 C 890531 REVISION DATE from Version 3.2 00025 C 891214 Prologue converted to Version 4.0 format. (BAB) 00026 C***END PROLOGUE DLGAMS 00027 DOUBLE PRECISION X, DLGAM, SGNGAM, DLNGAM 00028 C***FIRST EXECUTABLE STATEMENT DLGAMS 00029 DLGAM = DLNGAM(X) 00030 SGNGAM = 1.0D0 00031 IF (X.GT.0.D0) RETURN 00032 C 00033 INT = MOD (-AINT(X), 2.0D0) + 0.1D0 00034 IF (INT.EQ.0) SGNGAM = -1.0D0 00035 C 00036 RETURN 00037 END