1 SUBROUTINE GFUNP
(N
,IDEG
,PDG
,QDG
,X
,
2 $ XDGM1
,XDG
,PXDGM1
,PXDG
,G
,DG
)
4 C GFUNP EVALUATES THE START EQUATION "G".
8 C N IS THE NUMBER OF VARIABLES.
10 C IDEG(J) IS THE DEGREE OF THE J-TH EQUATION.
12 C PDG(1,J), PDG(2,J) ARE THE REAL AND IMAGINARY PARTS
13 C OF THE POWERS OF P USED TO DEFINE G.
15 C QDG(1,J), QDG(2,J) ARE THE REAL AND IMAGINARY PARTS
16 C OF THE POWERS OF Q USED TO DEFINE G.
18 C X(1,J), X(2,J) ARE THE REAL AND IMAGINARY PARTS OF THE
19 C J-TH INDEPENDENT VARIABLE.
21 C XDGM1,XDG,PXDGM1,PXDG ARE WORKSPACE ARRAYS.
25 C N,IDEG,PDG,QDG, AND X ARE UNCHANGED.
27 C G(1,J),G(2,J) ARE THE REAL AND IMAGINARY PARTS OF THE
28 C J-TH START EQUATION.
30 C DG(1,J),DG(2,J) ARE THE REAL AND IMAGINARY PARTS OF THE
31 C PARTIAL DERIVATIVES OF THE J-TH START EQUATION WITH RESPECT TO THE
32 C J-TH INDEPENDENT VARIABLE.
36 C DECLARATION OF INPUT AND OUTPUT:
38 DOUBLE PRECISION PDG
,QDG
,X
,XDGM1
,XDG
,PXDGM1
,PXDG
,G
,DG
39 DIMENSION IDEG
(N
),PDG
(2,N
),QDG
(2,N
),X
(2,N
),
40 $ XDGM1
(2,N
),XDG
(2,N
),PXDGM1
(2,N
),PXDG
(2,N
),
43 C DECLARATION OF VARIABLES
46 C COMPUTE THE (IDEG-1)-TH AND IDEG-TH POWER OF X
48 CALL POWP
(IDEG
(J
)-1,X
(1,J
), XDGM1
(1,J
))
49 CALL MULP
(X
(1,J
),XDGM1
(1,J
), XDG
(1,J
))
52 C COMPUTE THE PRODUCT OF PDG AND XDGM1
54 CALL MULP
( PDG
(1,J
), XDGM1
(1,J
), PXDGM1
(1,J
) )
57 C COMPUTE THE PRODUCT OF PDG AND XDG
59 CALL MULP
( PDG
(1,J
), XDG
(1,J
), PXDG
(1,J
) )
63 G
(I
,J
)=PXDG
(I
,J
) - QDG
(I
,J
)
64 DG
(I
,J
)= IDEG
(J
)*PXDGM1
(I
,J
)