Karl Brodowsky wrote:

Michael Zedeler schrieb:Well... maybe. How do you specify the intended precision, then? If Iwant the values from 1 to 2 with step size 0.01, I guess that writing1.00 .. 2.00won't be sufficient. Trying to work out the step size by looking atthe precision of things that are double or floats doesn't reallysound so feasible, since there are a lot of holes in the actualrepresentation, so 1.0001 may become 1.0, yielding very differentresults.That is a general problem of floats. We tend to write them in decimalnotation, but internally they use a representation which is binary.And it is absolutely not obvious what the "precision" of 1.0001 might be.There could be a data type like "LongDecimal" in Ruby or "BigDecimal"in Java, that actually has a knowlegde of its precision and whosenumbers are fractions with a power of 10 as the denominator. But forfloats I would only see the interval as reasonably clear. Even a stepof 1 is coming with some problems, because an increment of 1 does nothave any effect on floating point numbers like 1.03e300 or so.

Yes. Exactly my point. By the way, do we want to warn if someone writes 1e300 .. 1e301 :by(1) given that the number implementation yields 1e300 + 1 == 1e300? Regards, Michael.