Scale vector

SSCAL/DSCAL/CSCAL/CSSCAL/CSCALC/ZSCAL/ZDSCAL/ZSCALC

Name SSCAL/DSCAL/CSCAL/CSSCAL/CSCALC/ZSCAL/ZDSCAL/ZSCALC Scale vector

Purpose Given a real or complex scalar a and a real or complex vector x of length n, these subprograms perform the vector scaling operations

x ax and x ax

where x is the complex conjugate of x. The vector can be stored in a one-dimensional array or in either a row or a column of a two-dimensional array.

Usage

VECLIB:

 

 

INTEGER*4

n, incx

 

REAL*4

a, x(lenx)

 

CALL SSCAL(n, a, x, incx)

 

INTEGER*4

n, incx

 

REAL*8

a, x(lenx)

 

CALL DSCAL(n, a, x, incx)

 

INTEGER*4

n, incx

 

COMPLEX*8

a, x(lenx)

 

CALL CSCAL(n, a, x, incx)

 

INTEGER*4

n, incx

 

REAL*4

a

 

COMPLEX*8

x(lenx)

CALL CSSCAL(n, a, x, incx)

INTEGER*4

n, incx

COMPLEX*8

a, x(lenx)

CALL CSCALC(n, a, x, incx)

INTEGER*4

n, incx

COMPLEX*16

a, x(lenx)

CALL ZSCAL(n, a, x, incx)

INTEGER*4

n, incx

REAL*8

a

COMPLEX*16

x(lenx)

CALL ZDSCAL(n, a, x, incx)

Chapter 2 Basic Vector Operations 133