Re: This calculation is just wrong / computer can't count!



And "accurate" can ONLY be discussed in terms of a binary 52-bit mantissa. Talking about
text as if it is "accurate" is meaningless. Text is just text. The ONLY reality is a
64-bit IEEE-754 floating point representation, which is accurate to ±1/2LSB. Because you
labor under a delusional system in which you think decimal numbers have meaning to a
computer, you remain eternally confused.

Here is the heart of your failure to understand:

0.83333333333333337 is not correct / accurate, but is precise to 17 decimal
places.

Sorry. 0.83333333333333337 is correct, accurate, and in fact is accurate to 1 part in
2**52. Any other representation and any interpretation in any other representation is
meaningless to the computer. Just because it doesn't conform to decimal arithmetic is no
reason to say it is not correct or not accurate! You just don't get it. Binary
arithmetic is not decimal arithmetic

There are only 10 kinds of people in the world. Those who understand binary, and those
who don't.

If you get that, then you should understand what everyone has been telling you for days.
Computers do not use decimal arithmetic, not even for integers! The only difference is
that for some ranges of integers, the transformation is not information-losing. Please
explain what is wrong with this statement:

DWORD value = strtoul("12345678901", NULL, 10);

Same issue, EXACTLY the same issue.

joe
On Tue, 9 Oct 2007 17:19:36 +0100, "GT" <ContactGT_remove_@xxxxxxxxxxx> wrote:

"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:qa3ng316jmu1mirddnkejp9nbkg2oj1nfq@xxxxxxxxxx
What part of "you can't get it" are you not getting? You cannot get
0.8333333333333333.
because that is fewer bits of precision than an FPU implements. You
cannot get
0.83333333333333333 because it has no representation in floating point.

You have been told repeatedly that if you want to see the value
0.8333333333333333 then
print out fewer decimal places when you display it. This question was
answered many,
many, many times. If you type the value 0.8333333333333333 into your
computer, and
convert it to floating point, you get the value 0.83333333333333326. This
is less
accurate as a representation of 25/30 than 0.83333333333333333 for reasons
several of us
have explained to you.

Note that if you use textual representations then the following holds

double d = 25./30.; // 0.83333333333333337

CString s;
s.Format(_T("%.16f"), d); // 0.8333333333333333
double d2 = atof(s); // 0.83333333333333326

then
d != d2

because d has the value 0.83333333333333337 and d2 has the value
0.83333333333333326, so
your "more accurate" value is actually less accurate because it differs
from the
approximate, but incorrect, decimal value 0.83333333333333333 by a larger
amount.
Consequently, the "wrong" value is more "right", and this is what we've
all been trying to
explain to you!

You are mixing your terms again. Accurate means the number is correct,
precise refers to the number of decimal places.

0.83 is correct / accurate and precise to 2 decimal places.
0.8333333333333333 is not incorrect as you say, but is correct / accurate
and precise to 16 decimal places.
0.83333333333333337 is not correct / accurate, but is precise to 17 decimal
places.

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Conservation of Energy
    ... This why it is meaningless to talk about the absolute energy of a ... representation of the the signal, but at its physical manifestation. ... It is meaningless without ...
    (comp.dsp)
  • Re: We Robot
    ... think that phrase is completely meaningless. ... what objections do you have to the reasonings in the ... get onto representation. ...
    (talk.origins)
  • Re: How do you keep track of what all the numbers mean?
    ... that if you develop a floating point representation of a system, ... but I would suspect that scaling constants is a main part of it. ... There will be an assumed scaling between the floating point ... will depend upon the input signal power. ...
    (comp.dsp)
  • Re: Rounding of the double
    ... John von Neumann suggested that only fixed-point integers should be used because floating ... If you choose your representation as double, then you have to live with the consequences. ... you can never get precision in any computation on a computer than involves ... MVP Tips:http://www.flounder.com/mvp_tips.htm- Hide quoted text - ...
    (microsoft.public.vc.mfc)
  • Re: This calculation is just wrong / computer cant count!
    ... we have is the binary representation of the computer. ... your delusional system of mathematics, one based on a decimal arithmetic model, is ... "ignore" any aspect of floating point precision. ... "I do not wish to deal with the inherent inaccuracy of double precision floating point. ...
    (microsoft.public.vc.mfc)

Quantcast