DOT_PRODUCT intrinsic function

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


<Syntax>

DOT_PRODUCT ( VECTOR_A, VECTOR_B )

VECTOR_A : Integer, Real, Complex, or Logical array of rank one
VECTOR_B : same type and shape as VECTOR_A

<Semantics>

DOT_PRODUCT returns the dot product (also known as inner product) of two vectors. For Real and Integer this is the sum of the product of the corresponding array elements and is equal to SUM(VECTOR_A*VECTOR_B); for Complex it is the sum of the conjugate product of the corresponding array elements and is equal to SUM(CONJG(VECTOR_A)*VECTOR_B); for Logical “sum” is interpreted as the .OR. operation and “product” is interpreted as the .AND. operation, so this is equal to ANY(VECTOR_A.AND.VECTOR_B).

<Related>

Array-scalar operations, Array-array operations, MATMUL intrinsic function, PRODUCT intrinsic function, SUM intrinsic function