aboutsummaryrefslogtreecommitdiff
path: root/CarpetExtra/IDHydroToy/src/gammln.f77
diff options
context:
space:
mode:
Diffstat (limited to 'CarpetExtra/IDHydroToy/src/gammln.f77')
-rw-r--r--CarpetExtra/IDHydroToy/src/gammln.f7722
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.