saxpyi Subroutine

subroutine saxpyi(a, x, y, n)

saxpy with interchange of x and y

Arguments

Type IntentOptional AttributesName
real :: a
real :: x
real :: y
integer :: n

Contents

Source Code


Source Code

      subroutine saxpyi(a,x,y,n)
      implicit double precision (a-h,o-z)
      dimension x(*),y(*)
      if (a==0.D0) then
        do i=1,n
          call rexch(x(i),y(i))
        end do
      else
        do i=1,n
          z=y(i)
          y(i)=x(i)+a*y(i)
          x(i)=z
        end do
      end if
      end subroutine saxpyi