PRODUCT Function

Returns the product of all elements in an array.

enabled.

Usage

result = PRODUCT(array)

Input Parameters

array — An array.

Returned Value

result — A scalar value equal to the product of all the elements in array.

Keywords

None.

Discussion

If array is of type single- or double-precision floating point, or single- or double‑precision complex, the result will be of the same type. If array is of any other type, PRODUCT returns a single‑precision floating-point result.

Examples

PM, PRODUCT([2, 3, 4])
; PV-WAVE prints:
;    24.0000