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