 LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

◆ crot()

 subroutine crot ( integer N, complex, dimension( * ) CX, integer INCX, complex, dimension( * ) CY, integer INCY, real C, complex S )

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

Purpose:
``` CROT   applies a plane rotation, where the cos (C) is real and the
sin (S) is complex, and the vectors CX and CY are complex.```
Parameters
 [in] N ``` N is INTEGER The number of elements in the vectors CX and CY.``` [in,out] CX ``` CX is COMPLEX array, dimension (N) On input, the vector X. On output, CX is overwritten with C*X + S*Y.``` [in] INCX ``` INCX is INTEGER The increment between successive values of CY. INCX <> 0.``` [in,out] CY ``` CY is COMPLEX array, dimension (N) On input, the vector Y. On output, CY is overwritten with -CONJG(S)*X + C*Y.``` [in] INCY ``` INCY is INTEGER The increment between successive values of CY. INCX <> 0.``` [in] C ` C is REAL` [in] S ``` S is COMPLEX C and S define a rotation [ C S ] [ -conjg(S) C ] where C*C + S*CONJG(S) = 1.0.```
Date
December 2016

Definition at line 105 of file crot.f.

105 *
106 * -- LAPACK auxiliary routine (version 3.7.0) --
107 * -- LAPACK is a software package provided by Univ. of Tennessee, --
108 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
109 * December 2016
110 *
111 * .. Scalar Arguments ..
112  INTEGER incx, incy, n
113  REAL c
114  COMPLEX s
115 * ..
116 * .. Array Arguments ..
117  COMPLEX cx( * ), cy( * )
118 * ..
119 *
120 * =====================================================================
121 *
122 * .. Local Scalars ..
123  INTEGER i, ix, iy
124  COMPLEX stemp
125 * ..
126 * .. Intrinsic Functions ..
127  INTRINSIC conjg
128 * ..
129 * .. Executable Statements ..
130 *
131  IF( n.LE.0 )
132  \$ RETURN
133  IF( incx.EQ.1 .AND. incy.EQ.1 )
134  \$ GO TO 20
135 *
136 * Code for unequal increments or equal increments not equal to 1
137 *
138  ix = 1
139  iy = 1
140  IF( incx.LT.0 )
141  \$ ix = ( -n+1 )*incx + 1
142  IF( incy.LT.0 )
143  \$ iy = ( -n+1 )*incy + 1
144  DO 10 i = 1, n
145  stemp = c*cx( ix ) + s*cy( iy )
146  cy( iy ) = c*cy( iy ) - conjg( s )*cx( ix )
147  cx( ix ) = stemp
148  ix = ix + incx
149  iy = iy + incy
150  10 CONTINUE
151  RETURN
152 *
153 * Code for both increments equal to 1
154 *
155  20 CONTINUE
156  DO 30 i = 1, n
157  stemp = c*cx( i ) + s*cy( i )
158  cy( i ) = c*cy( i ) - conjg( s )*cx( i )
159  cx( i ) = stemp
160  30 CONTINUE
161  RETURN
Here is the caller graph for this function: