TOPICS
Search

Machine Epsilon


Machine epsilon is the gap between 1 and the next larger representable floating-point number in a given format. For a format with base beta and p significant base-beta digits, including the leading digit, it is

 epsilon_(mach)=beta^(1-p).

For binary double precision, beta=2 and p=53, giving epsilon_(mach)=2^(-52), approximately 2.22×10^(-16). The Wolfram Language supplies this value as $MachineEpsilon.

Machine epsilon measures the spacing of floating-point numbers near 1, not the smallest positive representable number. With rounding to nearest, half this value bounds the relative rounding error for numbers in the normal range. Some numerical-analysis references use "machine epsilon" for this half-sized bound instead, so the convention must be checked when comparing formulas.


See also

Floating-Point Arithmetic, Floating-Point Number, Floating-Point Representation, Rounding

Explore with Wolfram|Alpha

References

Driscoll, T. A. and Braun, R. J. "Floating-Point Numbers." In Fundamentals of Numerical Computation. https://fncbook.com/floating-point/.Wolfram Research. "$MachineEpsilon." https://reference.wolfram.com/language/ref/$MachineEpsilon.html.

Cite this as:

Weisstein, Eric W. "Machine Epsilon." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/MachineEpsilon.html

Subject classifications