GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
dlgams.f
Go to the documentation of this file.
1 *DECK DLGAMS
2  SUBROUTINE dlgams (X, DLGAM, SGNGAM)
3 C***BEGIN PROLOGUE DLGAMS
4 C***PURPOSE Compute the logarithm of the absolute value of the Gamma
5 C function.
6 C***LIBRARY SLATEC (FNLIB)
7 C***CATEGORY C7A
8 C***TYPE DOUBLE PRECISION (ALGAMS-S, DLGAMS-D)
9 C***KEYWORDS ABSOLUTE VALUE OF THE LOGARITHM OF THE GAMMA FUNCTION,
10 C FNLIB, SPECIAL FUNCTIONS
11 C***AUTHOR Fullerton, W., (LANL)
12 C***DESCRIPTION
13 C
14 C DLGAMS(X,DLGAM,SGNGAM) calculates the double precision natural
15 C logarithm of the absolute value of the Gamma function for
16 C double precision argument X and stores the result in double
17 C precision argument DLGAM.
18 C
19 C***REFERENCES (NONE)
20 C***ROUTINES CALLED DLNGAM
21 C***REVISION HISTORY (YYMMDD)
22 C 770701 DATE WRITTEN
23 C 890531 Changed all specific intrinsics to generic. (WRB)
24 C 890531 REVISION DATE from Version 3.2
25 C 891214 Prologue converted to Version 4.0 format. (BAB)
26 C***END PROLOGUE DLGAMS
27  DOUBLE PRECISION X, DLGAM, SGNGAM, DLNGAM
28 C***FIRST EXECUTABLE STATEMENT DLGAMS
29  dlgam = dlngam(x)
30  sgngam = 1.0d0
31  IF (x.GT.0.d0) RETURN
32 C
33  int = mod(-aint(x), 2.0d0) + 0.1d0
34  IF (int.EQ.0) sgngam = -1.0d0
35 C
36  RETURN
37  END
subroutine dlgams(X, DLGAM, SGNGAM)
Definition: dlgams.f:3
octave_int< T > mod(const octave_int< T > &x, const octave_int< T > &y)
Definition: oct-inttypes.h:932