EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pygamm.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pygamm.F
1  FUNCTION pygamm(X)
2 
3 C...Gives ordinary Gamma function Gamma(x) for positive, real arguments;
4 C...see M. Abramowitz, I. A. Stegun: Handbook of Mathematical Functions
5 C...(Dover, 1965) 6.1.36.
6  dimension b(8)
7  DATA b/-0.577191652,0.988205891,-0.897056937,0.918206857,
8  &-0.756704078,0.482199394,-0.193527818,0.035868343/
9 
10  nx=int(x)
11  dx=x-nx
12 
13  pygamm=1.
14  dxp=1.
15  DO 100 i=1,8
16  dxp=dxp*dx
17  pygamm=pygamm+b(i)*dxp
18  100 CONTINUE
19  IF(x.LT.1.) THEN
21  ELSE
22  DO 110 ix=1,nx-1
23  pygamm=(x-ix)*pygamm
24  110 CONTINUE
25  ENDIF
26 
27  RETURN
28  END