```01:       SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
02: *     .. Scalar Arguments ..
03:       DOUBLE PRECISION C,S
04:       INTEGER INCX,INCY,N
05: *     ..
06: *     .. Array Arguments ..
07:       DOUBLE PRECISION DX(*),DY(*)
08: *     ..
09: *
10: *  Purpose
11: *  =======
12: *
13: *     DROT applies a plane rotation.
14: *
15: *  Further Details
16: *  ===============
17: *
18: *     jack dongarra, linpack, 3/11/78.
19: *     modified 12/3/93, array(1) declarations changed to array(*)
20: *
21: *  =====================================================================
22: *
23: *     .. Local Scalars ..
24:       DOUBLE PRECISION DTEMP
25:       INTEGER I,IX,IY
26: *     ..
27:       IF (N.LE.0) RETURN
28:       IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
29: *
30: *       code for unequal increments or equal increments not equal
31: *         to 1
32: *
33:       IX = 1
34:       IY = 1
35:       IF (INCX.LT.0) IX = (-N+1)*INCX + 1
36:       IF (INCY.LT.0) IY = (-N+1)*INCY + 1
37:       DO 10 I = 1,N
38:           DTEMP = C*DX(IX) + S*DY(IY)
39:           DY(IY) = C*DY(IY) - S*DX(IX)
40:           DX(IX) = DTEMP
41:           IX = IX + INCX
42:           IY = IY + INCY
43:    10 CONTINUE
44:       RETURN
45: *
46: *       code for both increments equal to 1
47: *
48:    20 DO 30 I = 1,N
49:           DTEMP = C*DX(I) + S*DY(I)
50:           DY(I) = C*DY(I) - S*DX(I)
51:           DX(I) = DTEMP
52:    30 CONTINUE
53:       RETURN
54:       END
55: ```