rot(3F)

SROT, DROT - Applies a real plane rotation or complex coordinate rotation

As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.

NAME
     SROT, DROT - Applies a real plane rotation or complex coordinate
     rotation

SYNOPSIS
     Real

        CALL SROT (n, x, incx, y, incy, c, s)

     Double precision

        CALL DROT (n, x, incx, y, incy, c, s)

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

          (xi, yi), for all i = 1, 2, ..., n.

     These routines have the following arguments:

     n         Integer.  (input)
               Number of ordered pairs (planar points in SROT) to be
               rotated.  If n <= 0, these routines return without
               computation.

     x         Array of dimension (n-1) * |incx| + 1.  (input and output)
               SROT: Real array.
               DROT: Double precision array.
               On input, array x contains the x-coordinate of each planar
               point to be rotated.  On output, array x contains the
               x-coordinate of each rotated planar point.

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

     y         Array of dimension (n-1) * |incy| + 1.  (input and output)
               SROT: Real array.
               DROT: Double precision array.
               On input, array y contains the y-coordinate of each planar
               point to be rotated.  On output, array y contains the
               y-coordinate of each rotated planar point.

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

     c         Cosine of the angle of rotation, usually calculated using
               SROTG(3F) or CROTG(3F).  (input)
               SROT: Real.
               DROT: Double precision.

     s         Sine of the angle of rotation, usually calculated using
               SROTG. (input)
               SROT: Real.
               DROT: Double precision.

NOTES
     These routines are Level 1 Basic Linear Algebra Subprograms (Level 1
     BLAS).

     SROT/DROT applies the following plane rotation to each pair of
     elements (xi, yi):

          _    _      _      _     _    _
          | x  |  <-  | c  s |  *  | x  |
          |  i |      |      |     |  i |
          | y  |      |-s  c |     | y  |
          |  i |      |      |     |  i |
          -    -      -      -     -    -

     for i = 1,...,n

     If coefficients c and s satisfy c2 + s2 = 1.0, the rotation matrix is
     orthogonal, and the transformation is called a Givens plane rotation.
     If c = 1 and s = 0, SROT/DROT 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.

     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(3F), SROTM(3F), SROTMG(3F)