saxpyz Subroutine

subroutine saxpyz(a, x, y, z, n)

saxpy with result in z

Arguments

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

Contents

Source Code


Source Code

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