% -*- texinfo -*- % @deftypefn{Function File} {@var{p} =} safeprod (@var{x}, @var{dim}) % @deftypefnx{Function File} {[@var{p}, @var{e}] =} safeprod (@var{x}, @var{dim}) % This function forms product(s) of elements of the array @var{x} along the dimension % specified by @var{dim}, analogically to @code{prod}, but avoids overflows and underflows % if possible. If called with 2 output arguments, @var{p} and @var{e} are computed % so that the product is @code{@var{p} * 2^@var{e}}. % @seealso{prod,log2} % @end deftypefn