function varargout = factorial(varargin)
%FACTORIAL Factorial function.
%   F = FACTORIAL(N)
%   
%   64-bit integer input is not supported.
%   
%   Example:
%    
%       N = randi(100, 100000, 1, 'gpuArray'); % Random integers up to 100
%       F = factorial(N);
%   
%   See also FACTORIAL, GPUARRAY, GPUARRAY/PROD.


%   Copyright 2014 The MathWorks, Inc.

% try...catch prevents error being reported by internal
try
    [varargout{1:nargout}] = parallel.internal.flowthrough.factorial(varargin{:});
catch ME
    throw(ME);
end
