Support RETURN-FROM in DEF%TR forms
[maxima.git] / share / hompack / fortran / strptp.f
blobe586f6f8885ca9cbb546f0359561076c07fb453e
1 SUBROUTINE STRPTP(N,ICOUNT,IDEG,R ,X)
3 C COMPUTES INITIAL POINTS FOR PATHS.
5 C ON INPUT:
7 C N IS THE NUMBER OF (COMPLEX) VARIABLES.
9 C ICOUNT IS A COUNTER USED TO INCREMENT EACH
10 C VARIABLE AROUND THE UNIT CIRCLE SO THAT EVERY
11 C COMBINATION OF START VALUES IS CHOSEN. ICOUNT IS
12 C INITIALIZED IN POLYP.
14 C IDEG(J) IS THE DEGREE OF THE J-TH EQUATION.
16 C R(I,J) IS A (COMPLEX) ARRAY GENERATED BY SUBROUTINE INITP.
17 C R(1,J), AND R(2,J) ARE THE REAL AND IMAGINARY PARTS, RESPECTIVELY.
19 C ON OUTPUT:
21 C X(I,J) IS INITIALIZED TO THE START VALUES FOR THE CURRENT PATH,
22 C WITH X(1,J) AND X(2,J) THE REAL AND IMAGINARY PARTS OF THE
23 C J-TH VARIABLE, RESPECTIVELY.
25 C SUBROUTINES: ATAN, COS, MULP, SIN.
27 C DECLARATION OF INPUT AND OUTPUT:
28 INTEGER N,ICOUNT,IDEG
29 DOUBLE PRECISION R ,X
30 DIMENSION ICOUNT(N),IDEG(N)
31 DIMENSION R(2,N),X(2,N)
33 C DECLARATION OF VARIABLES:
34 INTEGER J
35 DOUBLE PRECISION TWOPI,ANGLE,XXXX
36 DIMENSION XXXX(2)
38 DO 10 J=1,N
39 IF(ICOUNT(J) .GE. IDEG(J) ) THEN
40 ICOUNT(J)=1
41 ELSE
42 ICOUNT(J)=ICOUNT(J)+1
43 GOTO 20
44 END IF
45 10 CONTINUE
46 20 CONTINUE
47 TWOPI = 8.0*ATAN(1.0)
48 DO 30 J=1,N
49 ANGLE = ( TWOPI/IDEG(J) )*ICOUNT(J)
50 XXXX(1) = COS(ANGLE)
51 XXXX(2) = SIN(ANGLE)
52 CALL MULP(XXXX,R(1,J),X(1,J))
53 30 CONTINUE
54 RETURN
55 END