dot(3) | Library Functions Manual | dot(3) |

# NAME

dot - dot: x^H x and x^T x

# SYNOPSIS

## Functions

complex function **cdotc** (n, cx, incx, cy, incy)

**CDOTC** complex function **cdotu** (n, cx, incx, cy, incy)

**CDOTU** double precision function **ddot** (n, dx, incx, dy, incy)

**DDOT** double precision function **dsdot** (n, sx, incx, sy, incy)

**DSDOT** real function **sdot** (n, sx, incx, sy, incy)

**SDOT** real function **sdsdot** (n, sb, sx, incx, sy, incy)

**SDSDOT** complex *16 function **zdotc** (n, zx, incx, zy, incy)

**ZDOTC** complex *16 function **zdotu** (n, zx, incx, zy, incy)

**ZDOTU**

# Detailed Description

# Function Documentation

## complex function cdotc (integer n, complex, dimension(*) cx, integer incx, complex, dimension(*) cy, integer incy)

**CDOTC**

**Purpose:**

CDOTC forms the dot product of two complex vectors CDOTC = X^H * Y

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*CX*

CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )

*INCX*

INCX is INTEGER storage spacing between elements of CX

*CY*

CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )

*INCY*

INCY is INTEGER storage spacing between elements of CY

**Author**

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

jack dongarra, linpack, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*)

Definition at line **82** of file **cdotc.f**.

## complex function cdotu (integer n, complex, dimension(*) cx, integer incx, complex, dimension(*) cy, integer incy)

**CDOTU**

**Purpose:**

CDOTU forms the dot product of two complex vectors CDOTU = X^T * Y

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*CX*

CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )

*INCX*

INCX is INTEGER storage spacing between elements of CX

*CY*

CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )

*INCY*

INCY is INTEGER storage spacing between elements of CY

**Author**

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

jack dongarra, linpack, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*)

Definition at line **82** of file **cdotu.f**.

## double precision function ddot (integer n, double precision, dimension(*) dx, integer incx, double precision, dimension(*) dy, integer incy)

**DDOT**

**Purpose:**

DDOT forms the dot product of two vectors. uses unrolled loops for increments equal to one.

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*DX*

DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )

*INCX*

INCX is INTEGER storage spacing between elements of DX

*DY*

DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )

*INCY*

INCY is INTEGER storage spacing between elements of DY

**Author**

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

jack dongarra, linpack, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*)

Definition at line **81** of file **ddot.f**.

## double precision function dsdot (integer n, real, dimension(*) sx, integer incx, real, dimension(*) sy, integer incy)

**DSDOT**

**Purpose:**

Compute the inner product of two vectors with extended precision accumulation and result. Returns D.P. dot product accumulated in D.P., for S.P. SX and SY DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is defined in a similar way using INCY.

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*SX*

SX is REAL array, dimension(N) single precision vector with N elements

*INCX*

INCX is INTEGER storage spacing between elements of SX

*SY*

SY is REAL array, dimension(N) single precision vector with N elements

*INCY*

INCY is INTEGER storage spacing between elements of SY

**Returns**

DSDOT is DOUBLE PRECISION DSDOT double precision dot product (zero if N.LE.0)

**Author**

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

**References:**

C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. Krogh, Basic linear algebra subprograms for Fortran usage, Algorithm No. 539, Transactions on Mathematical Software 5, 3 (September 1979), pp. 308-323. REVISION HISTORY (YYMMDD) 791001 DATE WRITTEN 890831 Modified array declarations. (WRB) 890831 REVISION DATE from Version 3.2 891214 Prologue converted to Version 4.0 format. (BAB) 920310 Corrected definition of LX in DESCRIPTION. (WRB) 920501 Reformatted the REFERENCES section. (WRB) 070118 Reformat to LAPACK style (JL)

Definition at line **118** of file **dsdot.f**.

## real function sdot (integer n, real, dimension(*) sx, integer incx, real, dimension(*) sy, integer incy)

**SDOT**

**Purpose:**

SDOT forms the dot product of two vectors. uses unrolled loops for increments equal to one.

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*SX*

SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )

*INCX*

INCX is INTEGER storage spacing between elements of SX

*SY*

SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )

*INCY*

INCY is INTEGER storage spacing between elements of SY

**Author**

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

jack dongarra, linpack, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*)

Definition at line **81** of file **sdot.f**.

## real function sdsdot (integer n, real sb, real, dimension(*) sx, integer incx, real, dimension(*) sy, integer incy)

**SDSDOT**

**Purpose:**

Compute the inner product of two vectors with extended precision accumulation. Returns S.P. result with dot product accumulated in D.P. SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is defined in a similar way using INCY.

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*SB*

SB is REAL single precision scalar to be added to inner product

*SX*

SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) single precision vector with N elements

*INCX*

INCX is INTEGER storage spacing between elements of SX

*SY*

SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) single precision vector with N elements

*INCY*

INCY is INTEGER storage spacing between elements of SY

**Author**

Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

REFERENCES C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. Krogh, Basic linear algebra subprograms for Fortran usage, Algorithm No. 539, Transactions on Mathematical Software 5, 3 (September 1979), pp. 308-323. REVISION HISTORY (YYMMDD) 791001 DATE WRITTEN 890531 Changed all specific intrinsics to generic. (WRB) 890831 Modified array declarations. (WRB) 890831 REVISION DATE from Version 3.2 891214 Prologue converted to Version 4.0 format. (BAB) 920310 Corrected definition of LX in DESCRIPTION. (WRB) 920501 Reformatted the REFERENCES section. (WRB) 070118 Reformat to LAPACK coding style

Definition at line **112** of file **sdsdot.f**.

## complex*16 function zdotc (integer n, complex*16, dimension(*) zx, integer incx, complex*16, dimension(*) zy, integer incy)

**ZDOTC**

**Purpose:**

ZDOTC forms the dot product of two complex vectors ZDOTC = X^H * Y

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*ZX*

ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )

*INCX*

INCX is INTEGER storage spacing between elements of ZX

*ZY*

ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) )

*INCY*

INCY is INTEGER storage spacing between elements of ZY

**Author**

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

jack dongarra, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*)

Definition at line **82** of file **zdotc.f**.

## complex*16 function zdotu (integer n, complex*16, dimension(*) zx, integer incx, complex*16, dimension(*) zy, integer incy)

**ZDOTU**

**Purpose:**

ZDOTU forms the dot product of two complex vectors ZDOTU = X^T * Y

**Parameters**

*N*

N is INTEGER number of elements in input vector(s)

*ZX*

ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )

*INCX*

INCX is INTEGER storage spacing between elements of ZX

*ZY*

ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) )

*INCY*

INCY is INTEGER storage spacing between elements of ZY

**Author**

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

**Further Details:**

jack dongarra, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*)

Definition at line **82** of file **zdotu.f**.

# Author

Generated automatically by Doxygen for LAPACK from the source code.

Version 3.12.0 | LAPACK |