News for hackers. Stuff that matters.
Re:How many floating-point numbers are in the interval [0,1]? by RandomOpinion on Wednesday March 01, 2017 @07:06PM (#13770036)
>Many people think floating point numbers are magically precise.

Even worse, it kicks in earlier than one might naively think. People are often surprised to hear a value as simple as 0.1 has no matching floating point representation.

(For those interested, http://www.exploringbinary.com/why-0-point-1-does-not-exist-... has a nicely illustrated explanation.)

Re:How many floating-point numbers are in the interval [0,1]? by TD-Linux on Wednesday March 01, 2017 @08:03PM (#13770423)
Being unable to represent 0.1 exactly is unrelated to any precision limitation. It's because the quantization of binary and decimal is different.
Re:How many floating-point numbers are in the interval [0,1]? by greenleafjacob on Wednesday March 01, 2017 @08:46PM (#13770678)
This isn't true with e.g. decimal64.
Re:How many floating-point numbers are in the interval [0,1]? by astrodust on Wednesday March 01, 2017 @09:18PM (#13770857)
Those sorts of numbers aren't floating point, they're typically fixed point.
Re:How many floating-point numbers are in the interval [0,1]? by SAI_Peregrinus on Thursday March 02, 2017 @12:58PM (#13776420)
No, that's explicitly a floating point format. It's one of the representations in IEE-754-2008. The three decimal floating point formats are decimal32, decimal64, and decimal128. That people often use them where fixed-point math would work doesn't mean they're not floating point formats.