# ?rot

Applies a plane rotation with real cosine and complex sine to a pair of complex vectors.

## Syntax

call crot( n, cx, incx, cy, incy, c, s )

call zrot( n, cx, incx, cy, incy, c, s )

## Description

This routine applies a plane rotation, where the cosine (c) is real and the sine (s) is complex, and the vectors cx and cy are complex. This routine has its real equivalents in BLAS (see ?rot in Chapter “BLAS and Sparse BLAS Routines”).

## Input Parameters

n

  INTEGER. The number of elements in the vectors cx and cy.

cx, cy

  COMPLEX for crot

  COMPLEX*16 for zrot

  Arrays of dimension (n), contain input vectors x and y, respectively.

incx

  INTEGER. The increment between successive elements of cx.

incy

  INTEGER. The increment between successive elements of cy.

c

  REAL for crot

  DOUBLE PRECISION for zrot

s

  COMPLEX for crot

  COMPLEX*16 for zrot

  Values that define a rotation

  where `c*c + s*conjg(s) = 1.0`.

## Output Parameters

cx

  On exit, overwritten with `c*x + s*y`.

cy

  On exit, overwritten with `-conjg(s)*x + c*y`.

Parent topic: Auxiliary Routines