J
jameskuyper
Richard said:....
An issue here is that if one is working with floating point
numbers one should, IMNSHO, think of them as representing ranges
of mathematical values, i.e., as an interval in the real number
line. At the same time a floating point number is also an exact
rational number. As such it is an exemplar of the range.
That sounds pretty much exactly like what Chuck said. Keith has been
saying that you don't have to think of them that way, that it's up to
the application whether or not it treats them in that fashion, so this
does not represent a common opinion that they could both agree with.
I have the impression he is the "only a discrete value" side,
that his view is that that is what the formalism says.
He's been very clear about the distinction between how floating point
numbers are stored and how they are used, and has repeatedly indicated
that it's up to the application how they are used.
....
That said, I think your thoughts on spacing are off the mark.
Floating point numbers are a representation of the real line; as
such they are necessarily inexact. Integers are a representation
of, well, integers. As such they are exact. If you are using
integers to denote things that are not integers then spacing
comes into play, but that is a different matter.
If I use an integer to store a count of the number of pixels in an
image, it represents an exact quantity. On the other hand, if I use an
integer to store the year that an event occurred in, that integer
represents the entire range of time from the start of that year to the
end of that year (with the handling of the boundary points an issue
I'd have to deal with, if it matters).
You could say that the integers merely identify the ranges, rather
than representing them, but the same can be said of floating point
numbers.
In most of my code, I treat floating point numbers, not as
representing a range of values, but as containing the best
representable approximation to the real number that I would store, if
I could. On those occasions when I do want to represent a range of
values, the width of that range always depends upon how the number was
calculated, it can't be calculated just by multiplying the central
value by DBL_EPSILON, and is usually much larger than the range you
get by such a calculation.
Therefore, even when I am treating a number as the center of a range
of values, rather than the best approximation to an exact value, it
would almost never be the kind of range that CBF is talking about.