%% 22!

format long
f = factorial(22)

% In this case, f is accurate up to 15 digits, 1.12400072777760e+21, because double-precision numbers are only accurate up to 15 digits.
%
% Reset the output format to the default.

format

% Copyright 2012 The MathWorks, Inc.