The product of all positive integers less than or equal to n is returned by f = factorial(n), where n is a nonnegative integer value. f includes the factorial of each value of n if n is an array. The data type and size of f are identical to those of n.