But 0.1 still cannot be represented exactly by float64, can it?
For any floatX unless X is infinity the number of floats that are not exactly represented is always infinite.
Martin
There is a countably infinite number of rational numbers and a uncountably infinite number of irrational numbers that cannot be represented.
We could also debate over whether infinity is exactly represented. When some math operation overflows (exceeds the range of floats), the result assigned is inf.
That's not the definition of infinity either: Take the set of real numbers R and the ordering operation <, then add an additional point "infinity" such that for any x belonging to R, x < infinity.
So, the inf in the float definition only represents "infinity" defined relative to the finitely countable set of numbers that can be represented as floats, not the actual infinity as represented in your head :)