1
$\begingroup$

What is the difference between machine epsilon and least positive number in floating point representation?

If I try to show the floating point number on a number line .Is the gap between exact 0 and the first positive (number which floating point can represent) ,and the gap between two successive numbers, different?

which one is generally smaller? and on which factor these two values depends(mantisa or exponent)?

$\endgroup$
3
$\begingroup$

Machine epsilon is the relative error (the error independent of what exponent you are currently using.)

It tells you the maximum error in the mantissa after a given operation. For example take sqrt(2.0) and sqrt(2048.0) = sqrt(2.0)*32.0. In IEEE 754 double precision (53-bit mantissa) the maximum error in the mantissa for this result will be $2^{-53} \approx 1.11\times10^{-16}$.

Put another way, to quote Wikipedia, the machine epsilon is

the maximum spacing between a normalised floating point number, $x$, and an adjacent normalised number is $2 \epsilon \times |x|$.

The least positive number in a floating point system includes the exponent. In double precision IEEE 754 the smallest normalized number is $2^{-1022} \approx 2.225 \times 10^{-308}$. The smallest denormalized number is $2^{-52}\times 2^{-1022}=2^{-1074}\approx 4.941\times 10^{-324}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.