Last change
on this file since 305 was
305,
checked in by vondreele, 12 years ago
|
remove pypowder & powsubs - no longer needed
add texturesubs & pytexture
|
File size:
1.0 KB
|
Line | |
---|
1 | FUNCTION DGAMMLN(XX) |
---|
2 | |
---|
3 | !PURPOSE: ln(gamma(xx)), taken from Numerical Recipes, p156-157 |
---|
4 | |
---|
5 | INCLUDE '../INCLDS/COPYRIGT.FOR' |
---|
6 | |
---|
7 | !PSEUDOCODE: |
---|
8 | |
---|
9 | !CALLING ARGUMENTS: |
---|
10 | |
---|
11 | REAL*8 DGAMMLN !ln(gamma(xx)) with xx>0 |
---|
12 | REAL*4 XX !argument must be >0 |
---|
13 | |
---|
14 | !INCLUDE STATEMENTS: |
---|
15 | |
---|
16 | !LOCAL VARIABLES: |
---|
17 | |
---|
18 | REAL*8 COF(6),STP,HALF,ONE,FPF,X,TMP,SER |
---|
19 | |
---|
20 | !SUBROUTINES CALLED: |
---|
21 | |
---|
22 | !FUNCTION DEFINITIONS: |
---|
23 | |
---|
24 | !DATA STATEMENTS: |
---|
25 | |
---|
26 | DATA COF,STP/76.18009172947146D0,-86.50532032941677D0, |
---|
27 | 1 24.01409824083091D0,-1.231739572450155D0,0.1208650973866D-2, |
---|
28 | 1 -0.5395239384953D-5,2.5066282746310005D0/ |
---|
29 | DATA HALF,ONE,FPF/0.5D0,1.000000000190015D0,5.5D0/ |
---|
30 | |
---|
31 | !CODE: |
---|
32 | |
---|
33 | X = XX-ONE |
---|
34 | TMP = X+FPF |
---|
35 | TMP = (X+HALF)*DLOG(TMP)-TMP |
---|
36 | SER = ONE |
---|
37 | DO J=1,6 |
---|
38 | X = X+ONE |
---|
39 | SER = SER+COF(J)/X |
---|
40 | END DO |
---|
41 | DGAMMLN = TMP+DLOG(STP*SER) |
---|
42 | RETURN |
---|
43 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.