06.03.2014 Views

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9 <strong>Intel</strong> <strong>Fortran</strong> <strong>Language</strong> <strong>Reference</strong><br />

Syntax:<br />

Class:<br />

Arguments:<br />

vector_a<br />

vector_b<br />

Results:<br />

result = DOT_PRODUCT (vector_a, vector_b)<br />

Transformational function; Generic<br />

Must be a rank-one array of numeric (integer, real, or complex) or logical type.<br />

Must be a rank-one array of numeric type if vector_a is of numeric type, or of<br />

logical type if vector_a is of logical type. It must be the same size as vector_a.<br />

The result is a scalar whose type depends on the types of vector_a and<br />

vector_b.<br />

If vector_a is of type integer or real, the result value is SUM<br />

(vector_a*vector_b).<br />

If vector_a is of type complex, the result value is SUM (CONJG<br />

(vector_a)*vector_b).<br />

If vector_a is of type logical, the result has the value ANY (vector_a .AND.<br />

vector_b).<br />

If either rank-one array has size zero, the result is zero if the array is of numeric<br />

type, and false if the array is of logical type. (For more information on<br />

expressions, see “Expressions”.)<br />

DPROD<br />

Examples<br />

DOT_PRODUCT ((/1, 2, 3/), (/3, 4, 5/)) has the value 26, calculated as follows:<br />

((1 x 3) + (2 x 4) + (3 x 5)) = 26<br />

DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) has the value (17.0, 4.0).<br />

DOT_PRODUCT ((/ .TRUE., .FALSE. /), (/ .FALSE., .TRUE. /)) has the value false.<br />

Description: Produces a higher precision product. This is a specific function that has no<br />

generic name associated with it. It cannot be passed as an actual argument.<br />

Syntax: result = DPROD (x, y)<br />

Class: Elemental function; Specific<br />

Arguments:<br />

x<br />

Must be of type REAL(4) or REAL(8).<br />

y Must have the same type and kind parameters as x.<br />

9-52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!