CXML

sdsdot 


FORMAT

  SDSDOT (n, alpha, x, incx, y, incy)

Function Value

  dotpr: real*4
  The dot product of the two vectors x and y.

       If n<=0, dotpr returns the value 0.0.

Arguments

  n                   integer*4
                      On entry, the number of elements in the vectors x and
                      y.
                      On exit, n is unchanged.

  alpha               real*4 | real*8
                      On entry, the scalar multiplier (alpha) for the
                      elements of the vector x.
                      On exit, alpha is unchanged.

  x                   real*4 | real*8
                      On entry, a one-dimensional array X of length at least
                      (1+(n-1)*|incx|), containing the elements of the vector
                      x.
                      On exit, x is unchanged.

  incx                integer*4
                      On entry, the increment for the array X.
                      If incx >= 0, vector x is stored forward in the array,
                      so that x(i) is stored in location X(1+(i-1)*incx).
                      If incx < 0, vector x is stored backward in the array,
                      so that x(i) is stored in location X(1+(n-i)*|incx|).
                      On exit, incx is unchanged.

  y                   real*4 | real*8
                      On entry, a one-dimensional array Y of length at least
                      (1+(n-1)*|incx|), containing the elements of the vector
                      y.
                      On exit, y is unchanged.

  incy                integer*4
                      On entry, the increment for the array Y.
                      If incy >= 0, vector y is stored forward in the array,
                      so that y(i) is stored in location Y(1+(i-1)*incy).
                      If incy < 0, vector y is stored backward in the array,
                      so that y(i) is stored in location Y(1+(n-i)*|incy|).
                      On exit, incy is unchanged.

Description

  SDSDOT scales the elements of a real vector, x, by the value of alpha and
  then computes the dot product of the resultant vector and another real
  vector, y.  SDSDOT returns the result in single precision.

Example

  INTEGER*4 INCX,INCY
  REAL*8 X(20),Y(20),alpha
  REAL*4 DOTPR
  INCX = 1
  INCY = 1
  alpha = 0.4
  N = 20
  DOTPR = SDSDOT(N,alpha,X,INCX,Y,INCY)

CXML Home Page

Index of CXML Routines