      FUNCTION DOTVEC(X,Y,N)
CDEP  
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      DIMENSION X(N),Y(N)
      SUM=0.
      DO 100 I=1,N
         SUM=SUM+X(I)*Y(I)
 100  CONTINUE
      DOTVEC=SUM
      END
