SROT(3)         BLAS routine of NEC Numeric Library Collection         SROT(3)



NAME
       SROT - BLAS level one, plane rotation subroutines

SYNOPSIS
       SUBROUTINE SROT    ( n, x, incx, y, incy, c, s )

           INTEGER              n, incx, incy

           REAL                 x, y, c, s


DESCRIPTION
       SROT   applies  a  plane  rotation matrix to a real sequence of ordered
       pairs:

            (x , y ), for all i = 1, 2, ..., n.
              i   i

ARGUMENTS
       n       INTEGER. (input)
               Number of ordered pairs (planar points in SROT) to be  rotated.
               If n <= 0, this routine returns without computation.

       x       REAL, (input and output)
               Array  of dimension (n-1) * |incx| + 1.  On input, array x con-
               tains the x-coordinate of each planar point to be rotated.   On
               output,  array x contains the x-coordinate of each rotated pla-
               nar point.

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

       y       REAL, (input and output)
               array of dimension (n-1) * |incy| + 1.
               On  input,  array  y  contains  the y-coordinate of each planar
               point to be rotated.  On output, array y contains the y-coordi-
               nate of each rotated planar point.

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

       c       REAL, Cosine of the angle of rotation.
               (input)

       s       REAL, Sine of the angle of rotation. (input)

NOTES
       This routine is Level 1  Basic  Linear  Algebra  Subprograms  (Level  1
       BLAS). It applies the following plane rotation to each pair of elements
       (x , y ):
                               i   i
            _      _       _      _     _      _
            | x(i) |  <--  | c  s |  .  | x(i) |
            | y(i) |       |-s  c |     | y(i) |
            -      -       -      -     -      -

            for i = 1,...,n
                                        2    2
       If coefficients c and s satisfy c  + s  = 1.0, the rotation matrix
       is orthogonal, and the transformation is called a Givens plane
       rotation. If c = 1 and s = 0, SROT returns without modifying any
       input parameters.

       To calculate the Givens coefficients c and s from a two-element
       vector to determine the angle of rotation, use SROTG(3S).

       When working backward (incx < 0 or incy < 0), each routine starts
       at the end of the vector and moves backward, as follows:

            x(1-incx * (n-1)), x(1-incx * (n-2)), ..., x(1)

            y(1-incy * (n-1)), y(1-incy * (n-2)), ..., y(1)


SEE ALSO
        SROTG(l), SROTM(l), SROTMG(l)



BLAS routine                                                           SROT(3)