0

I have a naive question regarding to floating point number’s machine epsilon.

As we know, a double floating point number has a machine epsilon around 10^-16, while the minimal, strictly positive value of a floating point number can be as small as 10^{-300}. Since the machine epsilon is the upper bound of the relative error, what is the sense of using this number 10^{-300} which is much smaller than the machine epsilon?

I must have misunderstood something about floating-point representation. Could you clarify?

smci
  • 32,567
  • 20
  • 113
  • 146
zell
  • 9,830
  • 10
  • 62
  • 115
  • 5
    Would you mind looking at this answer although it is for a question about R? I wrote the answer without knowing anything about the R programming language anyway. http://stackoverflow.com/questions/24847918/floating-point-precision-in-r/24848326#24848326 – Pascal Cuoq Jul 21 '14 at 18:44
  • Near-duplicate of [Extreme numerical values in floating-point precision in R](http://stackoverflow.com/questions/24847918/extreme-numerical-values-in-floating-point-precision-in-r). This is all generic IEEE-754 FP standard, not really a language-specific question. Only the language names for the extreme quantities change. – smci Feb 02 '17 at 08:19
  • Possible duplicate of [Extreme numerical values in floating-point precision in R](http://stackoverflow.com/questions/24847918/extreme-numerical-values-in-floating-point-precision-in-r) – smci Feb 02 '17 at 08:20

1 Answers1

1

So, the key point is that your epsilon is, as you say, the relative error.

So, all numbers, irrespective of size, are (roughly speaking) number +/- (number * epsilon).

Actually, that applies to the (common or garden) normalised numbers -- it is not true of the denormalized numbers... which is why those need to be handled carefully... but they are pretty exotic.

  • Yes. To give the asker a concrete example, a double-precision number can (only just) see the difference between `6.78E-300` and `6.7800000000000018E-300`. You see the relative difference between those two numbers is of the approximate magnitude 10^{-16}. However, a double cannot see the difference between `6.78E-300` and `6.78000000000000018E-300` (one more zero before the 18). – Jeppe Stig Nielsen Jul 21 '14 at 22:44