?rscl

Multiplies a vector by the reciprocal of a real scalar.

Syntax

call srscl( n, sa, sx, incx )

call drscl( n, sa, sx, incx )

call csrscl( n, sa, sx, incx )

call zdrscl( n, sa, sx, incx )

Include Files

  • Fortran: mkl.fi
  • C: mkl.h

Description

The routine ?rscl multiplies an n-element real/complex vector x by the real scalar 1/a. This is done without overflow or underflow as long as the final result x/a does not overflow or underflow.

Input Parameters

n

INTEGER. The number of components of the vector x.

sa

REAL for srscl/csrscl

DOUBLE PRECISION for drscl/zdrscl.

The scalar a which is used to divide each component of the vector x. sa must be 0, or the subroutine will divide by zero.

sx

REAL for srscl

DOUBLE PRECISION for drscl

COMPLEX for csrscl

DOUBLE COMPLEX for zdrscl.

Array, DIMENSION (1+(n-1)* |incx|).

The n-element vector x.

incx

INTEGER. The increment between successive values of the vector sx.

If incx > 0, sx(1)=x(1), and sx(1+(i-1)*incx)=x(i), 1<in.

Output Parameters

sx

On exit, the result x/a.

For more complete information about compiler optimizations, see our Optimization Notice.