www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DoublePrecisionMachineEpsilonExample.m
%% Accuracy in Double Precision % Display the distance from |1.0| to the next largest double-precision number. % Copyright 2015 The MathWorks, Inc. d = eps %% % |eps| is equivalent to |eps(1.0)| and |eps('double')|. %% % Compute |log2(eps)|. d = log2(eps) %% % In base |2|, |eps| is equal to |2^-52|. %% % Find the distance from |10.0| to the next largest double-precision % number. d = eps(10.0)