MATLAB Function Reference Previous page   Next Page
eps

Floating-point relative accuracy

Syntax

Description

eps returns the distance from 1.0 to the next largest double-precision number, that is eps = 2^(-52).

d = eps(X) is the positive distance from abs(X) to the next larger in magnitude floating point number of the same precision as X. X may be either double precision or single precision. For all X,

eps('double') is the same as eps or eps(1.0).

eps('single') is the same as eps(single(1.0)) or single(2^-23).

Except for denormals, if 2^E <= abs(X) < 2^(E+1), then

Replace expressions of the form

with

Examples

See Also

realmax, realmin


Previous page  eomday eq Next page

© 1994-2005 The MathWorks, Inc.