1 *> \brief \b CROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CROT + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/crot.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/crot.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/crot.f">
21 * SUBROUTINE CROT( N, CX, INCX, CY, INCY, C, S )
23 * .. Scalar Arguments ..
24 * INTEGER INCX, INCY, N
28 * .. Array Arguments ..
29 * COMPLEX CX( * ), CY( * )
38 *> CROT applies a plane rotation, where the cos (C) is real and the
39 *> sin (S) is complex, and the vectors CX and CY are complex.
48 *> The number of elements in the vectors CX and CY.
53 *> CX is COMPLEX array, dimension (N)
54 *> On input, the vector X.
55 *> On output, CX is overwritten with C*X + S*Y.
61 *> The increment between successive values of CY. INCX <> 0.
66 *> CY is COMPLEX array, dimension (N)
67 *> On input, the vector Y.
68 *> On output, CY is overwritten with -CONJG(S)*X + C*Y.
74 *> The increment between successive values of CY. INCX <> 0.
85 *> C and S define a rotation
88 *> where C*C + S*CONJG(S) = 1.0.
94 *> \author Univ. of Tennessee
95 *> \author Univ. of California Berkeley
96 *> \author Univ. of Colorado Denver
99 *> \date September 2012
101 *> \ingroup complexOTHERauxiliary
103 * =====================================================================
104 SUBROUTINE CROT( N, CX, INCX, CY, INCY, C, S )
106 * -- LAPACK auxiliary routine (version 3.4.2) --
107 * -- LAPACK is a software package provided by Univ. of Tennessee, --
108 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
111 * .. Scalar Arguments ..
112 INTEGER INCX, INCY, N
116 * .. Array Arguments ..
117 COMPLEX CX( * ), CY( * )
120 * =====================================================================
122 * .. Local Scalars ..
126 * .. Intrinsic Functions ..
129 * .. Executable Statements ..
133 IF( INCX.EQ.1 .AND. INCY.EQ.1 )
136 * Code for unequal increments or equal increments not equal to 1
141 $ IX = ( -N+1 )*INCX + 1
143 $ IY = ( -N+1 )*INCY + 1
145 STEMP = C*CX( IX ) + S*CY( IY )
146 CY( IY ) = C*CY( IY ) - CONJG( S )*CX( IX )
153 * Code for both increments equal to 1
157 STEMP = C*CX( I ) + S*CY( I )
158 CY( I ) = C*CY( I ) - CONJG( S )*CX( I )