The Octave Forge package repository is no longer actively maintained. Please find Octave Packages at https://packages.octave.org.

Navigation

Operators and Keywords

Function List:

C++ API

Function File: p = safeprod (x, dim)
Function File: [p, e] = safeprod (x, dim)

This function forms product(s) of elements of the array x along the dimension specified by dim, analogically to prod, but avoids overflows and underflows if possible. If called with 2 output arguments, p and e are computed so that the product is p * 2^e.

See also: prod,log2.

Package: general