
PROGRAM TEST

IMPLICIT NONE

C

INTEGER N

PARAMETER (N = 4)

C

DOUBLE PRECISION B1, B2, D1, D2, PARAM(5), X(N), Y(N)

INTEGER I, INCX, INCY

C

EXTERNAL DROTM, DROTMG

C

C Initialize the arrays X and Y to store the vectors x and y

C shown below.

C

C 5 2

C x = 5 y = 4

C 5 8

C 5 16

C

DATA X / 5.0D0, 5.0D0, 5.0D0, 5.0D0 /

DATA Y / 2.0D0, 4.0D0, 8.0D0, 1.6D1 /

C

PARAM(1) = 2

PRINT 1000

PRINT 1010, (X(I), Y(I), I = 1, N)

C

C Set up the rotation that will eliminate the third element.

C

D1 = 1.0D0

D2 = 1.0D0

B1 = X(3)

B2 = Y(3)

CALL DROTMG (D1, D2, B1, B2, PARAM)

C

C Apply the rotation to eliminate the third element and print

C the results.

C

INCX = 1

INCY = 1

CALL DROTM (N, X, INCX, Y, INCY, PARAM)

PRINT 1020

PRINT 1010, (X(I), Y(I), I = 1, N)

C

1000 FORMAT (7X, 'x ', 8X, 'y')

1010 FORMAT (2(3X, F7.4))

1020 FORMAT (/7X, 'x''', 8X, 'y''')

C

END

