kusano 2b45e8
      subroutine  zdrotf (n,zx,incx,zy,incy,c,s)
kusano 2b45e8
c
kusano 2b45e8
c     applies a plane rotation, where the cos and sin (c and s) are
kusano 2b45e8
c     double precision and the vectors zx and zy are double complex.
kusano 2b45e8
c     jack dongarra, linpack, 3/11/78.
kusano 2b45e8
c
kusano 2b45e8
      double complex zx(1),zy(1),ztemp
kusano 2b45e8
      double precision c,s
kusano 2b45e8
      integer i,incx,incy,ix,iy,n
kusano 2b45e8
c
kusano 2b45e8
      if(n.le.0)return
kusano 2b45e8
      if(incx.eq.1.and.incy.eq.1)go to 20
kusano 2b45e8
c
kusano 2b45e8
c       code for unequal increments or equal increments not equal
kusano 2b45e8
c         to 1
kusano 2b45e8
c
kusano 2b45e8
      ix = 1
kusano 2b45e8
      iy = 1
kusano 2b45e8
      if(incx.lt.0)ix = (-n+1)*incx + 1
kusano 2b45e8
      if(incy.lt.0)iy = (-n+1)*incy + 1
kusano 2b45e8
      do 10 i = 1,n
kusano 2b45e8
        ztemp = c*zx(ix) + s*zy(iy)
kusano 2b45e8
        zy(iy) = c*zy(iy) - s*zx(ix)
kusano 2b45e8
        zx(ix) = ztemp
kusano 2b45e8
        ix = ix + incx
kusano 2b45e8
        iy = iy + incy
kusano 2b45e8
   10 continue
kusano 2b45e8
      return
kusano 2b45e8
c
kusano 2b45e8
c       code for both increments equal to 1
kusano 2b45e8
c
kusano 2b45e8
   20 do 30 i = 1,n
kusano 2b45e8
        ztemp = c*zx(i) + s*zy(i)
kusano 2b45e8
        zy(i) = c*zy(i) - s*zx(i)
kusano 2b45e8
        zx(i) = ztemp
kusano 2b45e8
   30 continue
kusano 2b45e8
      return
kusano 2b45e8
      end