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

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



OK, trisect an angle, using only a straightedge and compass.

On Fri, 12 Oct 2007 16:42:47 +0100, "GT" <ContactGT_remove_@xxxxxxxxxxx> wrote:

"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:384vg3led6kru8m8mupk4bge0fhmgs4ao6@xxxxxxxxxx
No, the manipulation is required and mandatory if you want the binary
illusion to match
the decimal illusion. The decimal representation is NOT "reality", it is
someone's
OPINION of reality.

If your code were to drive a CNC machine tasked to cut objects into thirds
(assuming no waste, or equal waste from each third), then it would never
actually get it right. That is not opinion, that is fact. Each of the thirds
would be 0.33333333333333331 of the object, so tell us Joe, which piece
would you add the extra 0.00000000000000007 ? Of course, you can't represent
that number so who knows where is will go, but you certainly won't end up
with matching pieces.
*****
Hmmm... So how is 0.333 valid for this? You are going to have an error of 0.001 for every
inch, so which piece gets the "extra little bit"? Duh. It's called "reality".

Here's another: you have 100 bowling balls and three teams to divide them among. We know
that 100/3 = 33 1/3, but you aren't allowed to cut the bowling balls into pieces, so one
team will get 34.

And explain to me why the FPU thinks that

0.33333333333333331 * 3 = 1.0000000000000000

if you are so upset about values not being "precise". For some reason, multiplying your
"wrong" value produces the "right" result. In fact,

(25.0 / 30.0)*30.0 = 25.0

in spite of that "little bit of wrong answer". So you just Don't Get It. You think the
answer is wrong because it doesn't fit your preconceived notion of arithmetic, yet when
used in the computation, it produces the "right" result according to your preconceived
notion of arithmetic. So if intermediate values are "wrong", how do we get a "right"
answer? Or alternatively, how can you divide, fairly, 100 bowling balls among three
teams, so that an integral number of bowling balls are used (and don't give some specious
"but that's in integers" argument, because the ALU *only* works in terms of binary
integers! Floating point is an illusion on top of an integer ALU, and if you actually
ever studied the circuitry, you would realize that as well)
*****

The only illusion, or perhaps delusion here is in joes mind - he insists
that float and double are 100% accurate and he is wrong - they are only
very, very precise. The stored binary numbers are as close to the answer as
representable in x binary digits, so when you convert to decimal, you get an
answer that is as close to the answer was representable in x binary digits,
not an answer that is correct in decimal - there seems to be no getting
through to this man!
****
Where did I ever insist that float and double are 100% accurate? Show me where I said
that! I said that they have intrinsic errors, and as programmers we must understand and
compensate for those errors, and I also point out that *in spite of your opinion to the
contrary* that some values you think are errors produce correct, by your peculiar
standards, results. I said explicitly that floating point is not perfect, and I said
explicitly that ANY form of finite-precision arithmetic is imperfect. What you are not
seeing is that your delusional system where you think that you can represent values that
cannot be represented in computers must be the only representation that can exist is what
we are all complaining about!
****

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



Relevant Pages

  • Re: This calculation is just wrong / computer cant count!
    ... the decimal illusion. ... The decimal representation is NOT "reality", ... That is not opinion, that is fact. ... As a CNC engineer I can tell you with certainty that all CNC ...
    (microsoft.public.vc.mfc)
  • Re: This calculation is just wrong / computer cant count!
    ... the decimal illusion. ... The decimal representation is NOT "reality", ... That is not opinion, that is fact. ...
    (microsoft.public.vc.mfc)
  • Re: This calculation is just wrong / computer cant count!
    ... There is no 7 at the end of a decimal representation of 1/3. ... mathematicians insisted that mathematics could be a closed system in which all ... insisting that it MUST be achieved. ... of demands on your part are going to change this reality to correspond to your opinion. ...
    (microsoft.public.vc.mfc)
  • Re: RDBMS Data models
    ... only a shadow of reality. ... you approach the data and its representation -- what you store ... and how you store it. ... field -- and do the join on that so the user-visible field ...
    (comp.arch.embedded)
  • Re: Simple addition
    ... B> It's important to realize that this is, in a real sense, an illusion: ... TR> better, in my opinion, than no choice. ... >> gives some useless digits. ...
    (comp.lang.python)