====================================================================
dscal examples
====================================================================

Given an initial array

dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]

   [1.,2.,3.,4.,5.,6.]

scale each element by 2.0

dscal(6,2.0,dx,1)

   [2.,4.,6.,8.,10.,12.]

Note that this changes the initial array in place.

dx

   [2.,4.,6.,8.,10.,12.]

Given the initial array

dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]

   [1.,2.,3.,4.,5.,6.]

scale each element by 0.5

dscal(6,0.5,dx,1)

    [0.5,1.,1.5,2.,2.5,3.]

Given the initial array

dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]

   [1.,2.,3.,4.,5.,6.]

scale the first three elements by 0.5

dscal(3,0.5,dx,1)

   [0.5,1.,1.5,4.,5.,6.]

Given the initial array

dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]

   [1.,2.,3.,4.,5.,6.]

dscal will do nothing with a negative count

dscal(-3,0.5,dx,1)

   [1.,2.,3.,4.,5.,6.]

Given the initial array

dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]

   [1.,2.,3.,4.,5.,6.]

dscal will do nothing with a negative increment

dscal(3,0.5,dx,-1)

   [1.,2.,3.,4.,5.,6.]


====================================================================
Man Page Details
====================================================================

NAME
       DSCAL - BLAS level one, scales a double precision vector

SYNOPSIS
       SUBROUTINE DSCAL    ( n, alpha, x, incx )

           INTEGER           n, incx

           DOUBLE PRECISION  alpha, x


DESCRIPTION
       DSCAL  scales a double precision vector with a double precision scalar.
       DSCAL scales the vector x of length n and increment incx  by  the  con-
       stant a.

       This routine performs the following vector operation:

                 x <-- alpha x

       where alpha is a double precisoin scalar, and x is a double precision
       vector.

ARGUMENTS
       n       INTEGER. (input)
               Number of elements in the vector.
               If n <= 0, this routine returns without computation.

       alpha   DOUBLE PRECISION scalar alpha. (input)

       x       DOUBLE PRECISION, (input and output)
               Array of dimension (n-1) * |incx| + 1. Vector to be scaled.

       incx    INTEGER. (input)
               Increment between elements of x.
               If incx = 0, the results will be unpredictable.

