Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Libraries / Markwardt / CMPRODUCT

CMPRODUCT

CMPRODUCT

Name


  CMPRODUCT

Author


  Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
  craigm@lheamail.gsfc.nasa.gov

Purpose


  CMPRODUCT() is the multiplicative equivalent of TOTAL().

Calling Sequence


  Result = CMPRODUCT(ARRAY)

Description



  Calculates the product of all the elements of an array. Vector
  multiplication in groups of powers of two make this operation
  faster than a simple FOR loop. The number of actual
  multiplications is still N_ELEMENTS(ARRAY). Double precision
  should be used for the highest accuracy when multiplying many
  numbers.

Inputs



  ARRAY - Array of elements to multiply together. For instance,
          ARRAY could contain the dimensions of another array--then
          CMPRODUCT(ARRAY) would be the total number of elements of
          that other array.

Returns


  The result of the function is the total product of all the elements
  of ARRAY.

Example


See Also



  TOTAL, PRODUCT (from Astronomy User's Library)

Modification History


  Written, CM, 28 Mar 2000
    (based on outline of PRODUCT by William Thompson)
  $Id: cmproduct.pro,v 1.2 2001/03/25 18:10:42 craigm Exp $



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us