```01:       SUBROUTINE DSCAL(N,DA,DX,INCX)
02: *     .. Scalar Arguments ..
03:       DOUBLE PRECISION DA
04:       INTEGER INCX,N
05: *     ..
06: *     .. Array Arguments ..
07:       DOUBLE PRECISION DX(*)
08: *     ..
09: *
10: *  Purpose
11: *  =======
12: *
13: *     DSCAL scales a vector by a constant.
14: *     uses unrolled loops for increment equal to one.
15: *
16: *  Further Details
17: *  ===============
18: *
19: *     jack dongarra, linpack, 3/11/78.
20: *     modified 3/93 to return if incx .le. 0.
21: *     modified 12/3/93, array(1) declarations changed to array(*)
22: *
23: *  =====================================================================
24: *
25: *     .. Local Scalars ..
26:       INTEGER I,M,MP1,NINCX
27: *     ..
28: *     .. Intrinsic Functions ..
29:       INTRINSIC MOD
30: *     ..
31:       IF (N.LE.0 .OR. INCX.LE.0) RETURN
32:       IF (INCX.EQ.1) GO TO 20
33: *
34: *        code for increment not equal to 1
35: *
36:       NINCX = N*INCX
37:       DO 10 I = 1,NINCX,INCX
38:           DX(I) = DA*DX(I)
39:    10 CONTINUE
40:       RETURN
41: *
42: *        code for increment equal to 1
43: *
44: *
45: *        clean-up loop
46: *
47:    20 M = MOD(N,5)
48:       IF (M.EQ.0) GO TO 40
49:       DO 30 I = 1,M
50:           DX(I) = DA*DX(I)
51:    30 CONTINUE
52:       IF (N.LT.5) RETURN
53:    40 MP1 = M + 1
54:       DO 50 I = MP1,N,5
55:           DX(I) = DA*DX(I)
56:           DX(I+1) = DA*DX(I+1)
57:           DX(I+2) = DA*DX(I+2)
58:           DX(I+3) = DA*DX(I+3)
59:           DX(I+4) = DA*DX(I+4)
60:    50 CONTINUE
61:       RETURN
62:       END
63: ```