%% Limit of Integer Single Precision
% Above the value returned by flintmax('single'), not all integers can be represented exactly with single precision.
% Return the largest consecutive integer in IEEE® single precision, single(2^24).

f = flintmax('single')

%
% Add 1 to the value returned from flintmax.

f1 = f+1

%
% f1 is the same as f.

isequal(f,f1)

%
% Add 2 to the value returned from flintmax. The number 16777218 is represented exactly in single precision while 16777217 is not.

f2 = f+2

% Copyright 2012 The MathWorks, Inc.