Reputation: 528
I'm using the R package MAST and it produces some impressively small P-values -- so small I didn't think they could be stored as regular floating point values. Quadruple precision reaches only $10^{-34}$ (source). How is this possible?
Upvotes: 3
Views: 88
Reputation: 541
This isn't just R; computers in general can store tiny numbers because floating point numbers are represented with a sign bit, a fraction, and an exponent. The space reserved for the exponent permits very large and very small numbers. See the R documentation on machine precision (noting e.g. the difference between double.eps
and double.xmin
), and the Wikipedia page on IEEE 754-1985 which describes the original standard for representing floating-point numbers (updated in 2008).
Upvotes: 4