diff options
author | eschnett <> | 2001-03-01 11:40:00 +0000 |
---|---|---|
committer | eschnett <> | 2001-03-01 11:40:00 +0000 |
commit | 310f0ea48d18866b773136aed11200b6eda6378b (patch) | |
tree | 445d3e34ce8b89812994b6614f7bc9f4acbc7fe2 /CarpetExtra/IDHydroToy/src/gammln.f77 |
Initial revision
darcs-hash:20010301114010-f6438-12fb8a9ffcc80e86c0a97e37b5b0dae0dbc59b79.gz
Diffstat (limited to 'CarpetExtra/IDHydroToy/src/gammln.f77')
-rw-r--r-- | CarpetExtra/IDHydroToy/src/gammln.f77 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/CarpetExtra/IDHydroToy/src/gammln.f77 b/CarpetExtra/IDHydroToy/src/gammln.f77 new file mode 100644 index 000000000..b99fb6aa2 --- /dev/null +++ b/CarpetExtra/IDHydroToy/src/gammln.f77 @@ -0,0 +1,22 @@ + FUNCTION gammln(xx) + implicit none + REAL*8 gammln,xx + INTEGER j + DOUBLE PRECISION ser,stp,tmp,x,y,cof(6) + SAVE cof,stp + DATA cof,stp/76.18009172947146d0,-86.50532032941677d0, + *24.01409824083091d0,-1.231739572450155d0,.1208650973866179d-2, + *-.5395239384953d-5,2.5066282746310005d0/ + x=xx + y=x + tmp=x+5.5d0 + tmp=(x+0.5d0)*log(tmp)-tmp + ser=1.000000000190015d0 + do 11 j=1,6 + y=y+1.d0 + ser=ser+cof(j)/y +11 continue + gammln=tmp+log(stp*ser/x) + return + END +C (C) Copr. 1986-92 Numerical Recipes Software t4. |