LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

## ◆ zdscal()

 subroutine zdscal ( integer N, double precision DA, complex*16, dimension(*) ZX, integer INCX )

ZDSCAL

Purpose:
`    ZDSCAL scales a vector by a constant.`
Parameters
 [in] N ``` N is INTEGER number of elements in input vector(s)``` [in] DA ``` DA is DOUBLE PRECISION On entry, DA specifies the scalar alpha.``` [in,out] ZX ` ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )` [in] INCX ``` INCX is INTEGER storage spacing between elements of ZX```
Further Details:
```     jack dongarra, 3/11/78.
modified 3/93 to return if incx .le. 0.
modified 12/3/93, array(1) declarations changed to array(*)```

Definition at line 77 of file zdscal.f.

78 *
79 * -- Reference BLAS level1 routine --
80 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
81 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
82 *
83 * .. Scalar Arguments ..
84  DOUBLE PRECISION DA
85  INTEGER INCX,N
86 * ..
87 * .. Array Arguments ..
88  COMPLEX*16 ZX(*)
89 * ..
90 *
91 * =====================================================================
92 *
93 * .. Local Scalars ..
94  INTEGER I,NINCX
95 * ..
96 * .. Intrinsic Functions ..
97  INTRINSIC dcmplx
98 * ..
99  IF (n.LE.0 .OR. incx.LE.0) RETURN
100  IF (incx.EQ.1) THEN
101 *
102 * code for increment equal to 1
103 *
104  DO i = 1,n
105  zx(i) = dcmplx(da,0.0d0)*zx(i)
106  END DO
107  ELSE
108 *
109 * code for increment not equal to 1
110 *
111  nincx = n*incx
112  DO i = 1,nincx,incx
113  zx(i) = dcmplx(da,0.0d0)*zx(i)
114  END DO
115  END IF
116  RETURN
117 *
118 * End of ZDSCAL
119 *