%% Accuracy in Single Precision
% Display the distance from 1.0 to the next largest single-precision number.

d = eps('single')

% eps('single') is equivalent to eps(single(1.0)).
%
% Compute log2(eps('single')).

d = log2(eps('single'))

% In base 2, single-precision eps is equal to 2^-23.
%
% Find the distance from the single-precision representation of 10.0 to the next largest single-precision number.

d = eps(single(10.0))

% Copyright 2015 The MathWorks, Inc.