GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
algams.f
Go to the documentation of this file.
1*DECK ALGAMS
2 SUBROUTINE algams (X, ALGAM, SGNGAM)
3C***BEGIN PROLOGUE ALGAMS
4C***PURPOSE Compute the logarithm of the absolute value of the Gamma
5C function.
6C***LIBRARY SLATEC (FNLIB)
7C***CATEGORY C7A
8C***TYPE SINGLE PRECISION (ALGAMS-S, DLGAMS-D)
9C***KEYWORDS ABSOLUTE VALUE OF THE LOGARITHM OF THE GAMMA FUNCTION,
10C FNLIB, SPECIAL FUNCTIONS
11C***AUTHOR Fullerton, W., (LANL)
12C***DESCRIPTION
13C
14C Evaluates the logarithm of the absolute value of the gamma
15C function.
16C X - input argument
17C ALGAM - result
18C SGNGAM - is set to the sign of GAMMA(X) and will
19C be returned at +1.0 or -1.0.
20C
21C***REFERENCES (NONE)
22C***ROUTINES CALLED ALNGAM
23C***REVISION HISTORY (YYMMDD)
24C 770701 DATE WRITTEN
25C 890531 Changed all specific intrinsics to generic. (WRB)
26C 890531 REVISION DATE from Version 3.2
27C 891214 Prologue converted to Version 4.0 format. (BAB)
28C***END PROLOGUE ALGAMS
29C***FIRST EXECUTABLE STATEMENT ALGAMS
30 algam = alngam(x)
31 sgngam = 1.0
32 IF (x.GT.0.0) RETURN
33C
34 int = mod(-aint(x), 2.0) + 0.1
35 IF (int.EQ.0) sgngam = -1.0
36C
37 RETURN
38 END
subroutine algams(x, algam, sgngam)
Definition algams.f:3
function alngam(x)
Definition alngam.f:3
T mod(T x, T y)
Definition lo-mappers.h:294