EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dfint.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file dfint.F
1 *72*********************************************************************
2 *
3 *...CERN LIBRARY ROUTINE E104 (INTERPOLATION) :
4 *
5  FUNCTION dfint(NARG,ARG,NENT,ENT,TABLE)
6 c IMPLICIT DOUBLE PRECISION (A-H,O-Z)
7 cerw
8 c IMPLICIT INTEGER (I-N)
9 cerw
10 cywu>>
11  DOUBLE PRECISION fac,d,ent,arg,dfint,table
12  integer iadr,ifadr,j,jr,ncomb,ient,il,k,jb,nent,narg,
13  & ja,i,m,kd
14 cywu<<
15 
16  dimension arg(5),nent(5),ent(63),table(882)
17  dimension d(5),ncomb(5),ient(5)
18  kd=1
19  m=1
20  ja=1
21  DO 5 i=1,narg
22  ncomb(i)=1
23  jb=ja-1+nent(i)
24  DO 2 j=ja,jb
25  IF (arg(i).LE.ent(j)) go to 3
26  2 CONTINUE
27  j=jb
28  3 IF (j.NE.ja) go to 4
29  j=j+1
30  4 jr=j-1
31  d(i)=(ent(j)-arg(i))/(ent(j)-ent(jr))
32  ient(i)=j-ja
33  kd=kd+ient(i)*m
34  m=m*nent(i)
35  5 ja=jb+1
36  dfint=0.d0
37  10 fac=1.d0
38  iadr=kd
39  ifadr=1
40  DO 15 i=1,narg
41  IF (ncomb(i).EQ.0) go to 12
42  fac=fac*(1.d0-d(i))
43  go to 15
44  12 fac=fac*d(i)
45  iadr=iadr-ifadr
46  15 ifadr=ifadr*nent(i)
47  dfint=dfint+fac*table(iadr)
48  il=narg
49  40 IF (ncomb(il).EQ.0) go to 80
50  ncomb(il)=0
51  IF (il.EQ.narg) go to 10
52  il=il+1
53  DO 50 k=il,narg
54  50 ncomb(k)=1
55  go to 10
56  80 il=il-1
57  IF(il.NE.0) go to 40
58  RETURN
59  END