CBFalconer said:
Flash Gordon wrote:
.... snip ...
But now you are using extraneous information, beyond that held in
the FP value. You are using the fact that you know than only
integers have ever been stored. This is not intrinsic to the FP
value.
Variables do NOT exist in isolation, not do values. They exist within
programs.
You have snipped without addressing the following points:
1) By EXACTLY the same argument all integer types represent a range of
values (I gave examples of real situations where this applies)
2) The only way to determine the range of values represented, whether it
is stored as an integer or floating point, IS to use the additional
information and do an error analysis.
I.e. WITHOUT performing an error analysis all you can do is say that a
variable may or may not represent a number somewhere on the complex
plain and the error may be infinite.
I.e. the definition of the floating point model in C tels you NOTHING
about the range of numbers that any variable might represent.
Another example
double x = sin(11);
Does the foating point model tell you what value x will contain?
Given the value of x without knowing that it is the result of the sin
function, can you use the floating point model (and NOTHING else) to
derive a range that includes the mathematical value of sin(11) ?
Just to give you a clue, the answer to BOTH questions is NO. If you
claims were true the answer to both questions would be yes.