]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA/pythia/pygamm.F
New version of MUON from M.Bondila & A.Morsch
[u/mrichter/AliRoot.git] / PYTHIA / pythia / pygamm.F
CommitLineData
fe4da5cc 1
2C*********************************************************************
3
4 FUNCTION PYGAMM(X)
5
6C...Gives ordinary Gamma function Gamma(x) for positive, real arguments;
7C...see M. Abramowitz, I. A. Stegun: Handbook of Mathematical Functions
8C...(Dover, 1965) 6.1.36.
9 DIMENSION B(8)
10 DATA B/-0.577191652,0.988205891,-0.897056937,0.918206857,
11 &-0.756704078,0.482199394,-0.193527818,0.035868343/
12
13 NX=INT(X)
14 DX=X-NX
15
16 PYGAMM=1.
17 DXP=1.
18 DO 100 I=1,8
19 DXP=DXP*DX
20 PYGAMM=PYGAMM+B(I)*DXP
21 100 CONTINUE
22 IF(X.LT.1.) THEN
23 PYGAMM=PYGAMM/X
24 ELSE
25 DO 110 IX=1,NX-1
26 PYGAMM=(X-IX)*PYGAMM
27 110 CONTINUE
28 ENDIF
29
30 RETURN
31 END