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