> THAT is already present. "float" in C
means that it is an approximation
> to 24 binary significant digits.
On Thu, 20 Oct 2011, David Cantrell wrote:
No, it tells you that it can *represent no more than*
24 binary
significant digits.
float pi = 3.1f; /* close enough for government work */
that the *type* can have 24 significant binary digits doesn't mean
that the *data* has 24 significant binary digits.
I have to disagree.
Significant digits are not the same as having CORRECT info or data.
And 24 binary significat digits is absolutely NOT the same as 24 CORRECT
binary digits.
float pi = 3.1f;
DOES, INDEED, give you 24 significant digts OF WHAT YOU FED IT.
Therefore, we have set PI (in our "pi" variable) to 24 significant binary
digits of 3.100000
(and 3.100000 has more significant digits that 3.1, indisunirregardless of
whether we intended it to represent PI)
That is certainly NOT an accurate approximation of PI, BUT that isn't what
we asked the computer for. We asked it to give us 24 bit accuracy
storage of 3.1 It did.
We need need more that 3 significant digits of 22/7, and an approximation
of PI that is CORRECT for more than 3 significant digits to demonstrate
our premise that PI is NOT 22/7.
Mostly unrelated Q: In Windoze 3.11, if you used the calculator to subract
3.10 from 3.11 , it gave a result of 0 ! What was the cause of THAT
error?
--
Grumpy Ol' Fred cisin at
xenosoft.com