mat_wdotur Function

public function mat_wdotur(n, xr, xi, incx, yr, yi, incy)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
doubleprecision :: xr(*)
doubleprecision :: xi(*)
integer :: incx
doubleprecision :: yr(*)
doubleprecision :: yi(*)
integer :: incy

Return Value doubleprecision


Source Code

doubleprecision function mat_wdotur(n,xr,xi,incx,yr,yi,incy)
integer,intent(in) :: n
doubleprecision    :: xr(*)
doubleprecision    :: xi(*)
integer            :: incx
doubleprecision    :: yr(*)
doubleprecision    :: yi(*)
integer            :: incy

doubleprecision    :: s
integer            :: ix
integer            :: iy
integer            :: i

   s = 0.0d0
   if (n .gt. 0) then
      ix = 1
      iy = 1
      if (incx.lt.0) ix = (-n+1)*incx + 1
      if (incy.lt.0) iy = (-n+1)*incy + 1
      do i = 1, n
         s = mat_flop(s + xr(ix)*yr(iy) - xi(ix)*yi(iy))
         ix = ix + incx
         iy = iy + incy
      enddo
   endif

   mat_wdotur = s

end function mat_wdotur