CBFalconer said:
Maybe that is the problem. The C standard cannot override
mathematics and physics - it simply has to be subservient. If it
apparently is not, that indicates an omission in the standard.
No, it doesn't have to be subservient, and it isn't.
Physics, as I'm sure you'd be quick to say if the shoe were on the
other foot, is off-topic. Floating-point numbers can of course
be used to model physical quantities, though the model is only an
approximation in most cases.
As for mathematics, it encompasses far more than you seem willing
to acknowledge. The set of floating-point numbers of a given
type corresponds to a finite proper subset of the real numbers.
That is a perfectly valid mathematical concept.
Are you asserting that a model in which the FP numbers completely
cover a range of real numbers is mathematically valid, while a model
in which they cover only a finite subset of real numbers is not?
If the standard states that a value in a FP object represents an
object in the range x*(1-EPSILON) to x*(1+EPSILON), that is fair
enough. If it also says that the FP object value is exact, it is
wrong, or it is reusing words in a different manner, etc.
Since I can't easily render the formula in 5.2.4.4.2 in
plain text, I've grabbed a screenshot and made it available at
<
http://www.mib.org/~kst/5.2.4.2.2.gif>. Please read it. It very
clearly says that a floating-point number is defined by a formula
that specifies a single unique real value, *not* a range.
If you want to argue that I've misinterpreted it, that the formula
in the standard is consistent with your interpretation, by all
means make that argument. If, on the other hand, you want to argue
that the model in the standard is flawed, then make that argument.
But if you want to claim your model is right, and that a model
that implementers and programmers have been using for years with
no problems I'm aware of beyond those that are inevitable for any
floating-point model, you're going to have to make a much better
argument than you've been making so far.
It's not impossible that you're right and the rest of us are wrong.
But if I were seeing this kind of nearly unaniminous disagreement
from people I respect, I'd take a moment to reexamine my assumptions.