GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
dgamr.f
Go to the documentation of this file.
1*DECK DGAMR
2 DOUBLE PRECISION FUNCTION dgamr (X)
3C***BEGIN PROLOGUE DGAMR
4C***PURPOSE Compute the reciprocal of the Gamma function.
5C***LIBRARY SLATEC (FNLIB)
6C***CATEGORY C7A
7C***TYPE DOUBLE PRECISION (GAMR-S, DGAMR-D, CGAMR-C)
8C***KEYWORDS FNLIB, RECIPROCAL GAMMA FUNCTION, SPECIAL FUNCTIONS
9C***AUTHOR Fullerton, W., (LANL)
10C***DESCRIPTION
11C
12C DGAMR(X) calculates the double precision reciprocal of the
13C complete Gamma function for double precision argument X.
14C
15C***REFERENCES (NONE)
16C***ROUTINES CALLED DGAMMA, DLGAMS, XERCLR, XGETF, XSETF
17C***REVISION HISTORY (YYMMDD)
18C 770701 DATE WRITTEN
19C 890531 Changed all specific intrinsics to generic. (WRB)
20C 890531 REVISION DATE from Version 3.2
21C 891214 Prologue converted to Version 4.0 format. (BAB)
22C 900727 Added EXTERNAL statement. (WRB)
23C***END PROLOGUE DGAMR
24 DOUBLE PRECISION x, alngx, sgngx, dgamma
25 EXTERNAL dgamma
26C***FIRST EXECUTABLE STATEMENT DGAMR
27 dgamr = 0.0d0
28 IF (x.LE.0.0d0 .AND. aint(x).EQ.x) RETURN
29C
30 CALL xgetf (irold)
31 CALL xsetf (1)
32 IF (abs(x).GT.10.0d0) GO TO 10
33 dgamr = 1.0d0/dgamma(x)
34 CALL xerclr
35 CALL xsetf (irold)
36 RETURN
37C
38 10 CALL dlgams (x, alngx, sgngx)
39 CALL xerclr
40 CALL xsetf (irold)
41 dgamr = sgngx * exp(-alngx)
42 RETURN
43C
44 END
double precision function dgamma(x)
Definition dgamma.f:3
double precision function dgamr(x)
Definition dgamr.f:3
subroutine dlgams(x, dlgam, sgngam)
Definition dlgams.f:3
subroutine xerclr
Definition xerclr.f:3
subroutine xgetf(kontrl)
Definition xgetf.f:3
subroutine xsetf(kontrl)
Definition xsetf.f:3