EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
polint5.F
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file polint5.F
1
C
2
3
SUBROUTINE
polint5
(XA,YA,N,X,Y,DY)
4
5
IMPLICIT
DOUBLE PRECISION
(a-h, o-
z
)
6
C Adapted from "Numerical Recipes"
7
parameter
(nmax=10)
8
dimension xa(
n
),ya(
n
),
c
(nmax),
d
(nmax)
9
ns=1
10
dif=abs(
x
-xa(1))
11
DO
11 i=1,
n
12
dift=abs(
x
-xa(i))
13
IF
(dift.LT.dif)
THEN
14
ns=i
15
dif=dift
16
ENDIF
17
c
(i)=ya(i)
18
d
(i)=ya(i)
19
11
CONTINUE
20
y
=ya(ns)
21
ns=ns-1
22
DO
13 m=1,
n
-1
23
DO
12 i=1,
n
-m
24
ho=xa(i)-
x
25
hp=xa(i+m)-
x
26
w=
c
(i+1)-
d
(i)
27
den=ho-hp
28
IF
(den.EQ.0.)pause
29
den=w/den
30
d
(i)=hp*den
31
c
(i)=ho*den
32
12
CONTINUE
33
IF
(2*ns.LT.
n
-m)
THEN
34
dy
=
c
(ns+1)
35
ELSE
36
dy
=
d
(ns)
37
ns=ns-1
38
ENDIF
39
y
=
y
+
dy
40
13
CONTINUE
41
RETURN
42
END
PEPSI
blob
master
pepsi
polint5.F
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:57
using
1.8.2 with
EIC GitHub integration