News for hackers. Stuff that matters.
Re:How many floating-point numbers are in the interval [0,1]? by marcosdumay on Thursday March 02, 2017 @11:48AM (#13775568)
Useful answer: Use a double.

Really, 52 bits of mantissa is more than enough for representing anything. You have to be wary of error building up on calculations, not of original representation errors (unless you are living on the edge; and I'd tell you: don't).

Useless answer: No, the precision is fixed for any magnitude. When you multiply your values, you will also multiply the interval, and there are as many useful numbers inside that new, larger, interval than were inside the old, smaller one.

There are no comments on this comment yet.