CBFalconer said:
Definitely NOT including.
Definitely NOT including. Also the upper value for y (ymax) is
slightly more than DBL_EPSILON from the fp-object-value of y.
Why is it "slightly more"? Are you saying that ymax > 1.0+DBL_EPSILON*2
(as a real, not FP, expression)? By how much?
No. The real number 1.0+DBL_EPSILON is not a fp-object-value. It
is a number that will, when stored in a fp-object, cause that
object to be the adjacent one to x and larger than x. I.e. y. Now
remember that y is > x. Thus the reduction in y via
y*(1-DBL_EPSILON) (=ymin) is greater than the earlier increase in x
(which generated y). Here I am using real numbers. Thus ymin <
xmax. There is NO overlap. I got this part straight a few days
ago.
I think we need to clarify what xmin, xmax, ymin, and ymax actually
mean. I think perhaps you've swapped the intended meanings of xmax
and ymin somehow.
In your model, a floating-point value (let's say it's stored in a
floating-point object) represents a range of real values.
The FP value x (or FP-object-value, if you insist) represents the
range xmin .. xmax. We can leave aside for now the question of
whether the endpoints are included. The FP value y represents the
range ymin .. ymax.
This is how I am defining xmin, xmax, ymin, and ymax.
Can you agree with that? If not, where do you see a problem?
Now, given that x and y are adjacent FP values (i.e.,
nextafter(x, +INFINITY) == y), I believe it follows that xmax == ymin.
Otherwise, there is either an overlap or a gap between the ranges
represented by x and y.
[...]
Yes. I am maintaining what the standard says about it. The rest
is based on my knowledge of the construction of fp systems. That's
why using the value 1.0 causes difficulties, because the EPSILON
value changes as the value gets below 1.0 (by a factor of 2, in
most systems).
I think your knowledge of fp systems is flawed, or at least
inconsistent with the C standard.
I've asked you this before but ... if your model is valid, then it is
a set of fundamental facts about floating-point numbers, facts without
which it is difficult or impossible to understand what FP numbers
really mean. Why then does the standard say so little about these
ranges of yours? If you had written C99 5.2.4.2.2, I presume the word
"range" would have appeard many times; why does the standard use the
word "range" only in reference to the full range of a floating-point
type, never to the range represented by a single value?