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



Perhaps it is you that requires the schooling. Please demonstrate, using ordinary
arithmetic, how

(25/30)*30 = 25.

I learned how to do this fifty years ago, and I *KNOW* you are wrong because I cannot come
up with a method using your so-called "basic maths" in which this can be made to produce
the result you claim it can. All I can get is 24.999999999999... as a result.

Note: "roundoff" is not a permissible option. You are not permitted to round any result
at all. You must demonstrate PRECISELY how you can achieve what is an impossible
computational result using ordinary arithmetic. But if you ALLOW roundoff, then you MUST
allow 0.83333333333333337 to be a valid representation, because it is a rounded value!
Therefore,either rounding is bad, in which case you cannot prove your assertion, or
rounding is good, in which case you have to accept 0.83333333333333337 as a valid value!
You can't have it both ways!

Also, you have to completely abandon the concept of text strings of decimal digits as
being a meaningful representation of numbers. You must confine future discussions to
64-bit binary floating point numbers, and talk about bits of the mantissa. It is no
longer sensible to keep this discussion up when you keep inisisting that representations
are fully interchangeable. They are not.

You think that rounding is done in terms of decimal numbers. It is not. Rounding is
ALWAYS done in terms of ±1/2 least-significant-digit. Therefore, as I pointed out, there
are only TWO POSSIBLE REPRESENTATIONS of 25/30

0.83333333333333326 (truncated)
0.83333333333333337 (rounded)

For computers, this is "basic maths" and it is based on the rounding of the
least-significant digit of the 52-bit mantissa. That is, ±1/2 the least significant bit.
Any delusional system you have that this is supposed to work like decimal rounding (which
works ±1/2 decimal digit) is indicative of your failure to understand "basic maths" AS
IMPLEMENTED IN REAL COMPUTING DEVICES.

Perhaps you need to re-learn arithmetic. You clearly have no grasp of it, and this is
easily demonstrated because you will not be able to show me how you get the result you
desire. You cannot make your example work right in decimal arithmetic, so stop whining
about how floating point fails.

I have been working wtih computer arithmetic for 44 years, and I have yet to see a system
that conforms to your notion of reality. ALL floating point has issues like this, and if
you were paying attention to ANYONE who has posted on this thread, you would realize that
either we ALL are wrong, or you are wrong. The difference is that I've gotten tired of
your insistence that abstract math is implementable on real devices, and I don't mind
telling you that you are full of it, that you are totally clueless, and that it is clear
beyond any shadow of a doubt that you have no idea how computer arithmetic ACTUALLY WORKS.

Let's put it this way: Charles Babbage would think you are a fool. So would Blaise
Pascal. These are people who built genuine computational devices, and THEY understood
what everyone else is trying to explain to you. I suspect a Babylonian surveyor would
think you a fool

As early as the 19th century BC, Babylonian mathematicians were using p = 25/8, which is
within 0.5% of the true value.
-- http://en.wikipedia.org/wiki/Pi

[That is, even the Babylonians knew that to do real computations you had to deal with
approximations! Four thousand years ago, approximately.]

Archimedes of Syracuse discovered, by considering the perimeters of 96-sided polygons
inscribing a circle and inscribed by it, that p is between 223/71 and 22/7. The average of
these two values is roughly 3.1419.

The Chinese mathematician and astronomer Zu Chongzhi computed p to be between 3.1415926
and 3.1415927 and gave two approximations of p, 355/113 and 22/7, in the 5th century.
-- http://en.wikipedia.org/wiki/Pi

That is, we actually have MILLENIA of experience that computational values used in finite
computations are approximate. When approximations are used, errors can be introduced. But
the people who were computing the circumferences of values understood notions such as
significant digits, and roundoff, and you seem to be incapable of grasping the concept.

You have to STOP thinking about abstract math and in all future discussions of "basic
maths" you must substantiate your claims by showing actual computations. Not computations
done on a calculator; you have to demonstrate using ordinary grade-school arithmetic that
you can prove your point. Thus far, you have failed to do so. Furthermore, you will have
to limit your discussion about precision and accuracy of the computer to ONLY binary
floating point representations in the future, because you are clearly being confused by
decimal approximations of these.

How many centuries of REAL IMPLEMENTABLE MATH do you think you can ignore and continue to
insist that computers implement abstract mathetmatics?
joe


On Mon, 8 Oct 2007 10:44:07 +0100, "GT" <ContactGT_remove_@xxxxxxxxxxx> wrote:

"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:88jgg3h4k9o9ka74vq4p2q67iponrrnrkv@xxxxxxxxxx
If you stop saying "introduces an erroneous digit" and replace it with "I
am incapable of
understanding reality" you will be closer to the correct answer to your
problem, and that
tells you what you need to fix.

And if you take your feet out of your mouth long enough, you can get back to
school and learn some basic maths!

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



Relevant Pages

  • Re: Integer Promotion?
    ... I want to talk about the core functionality of the language, ... in floating-point representations; they are usually content to let ... "mathematical" kind of brain. ... Sure, I'm good at maths, but I rather drink ...
    (comp.lang.c)
  • Re: VAT Rounding Question
    ... When I did Maths O and A levels the general *maths* rule for rounding ... The rule you recall is, if I recall rightly, a ... Robin ...
    (uk.business.accountancy)
  • Re: Do you think 12:00pm is noon or midnight?
    ... We are in danger of wandering too deep into maths here. ... With the most common form of rounding, ... rounding was more likely than truncation. ... With a digital device, it would as Harlan says, 12:00 ...
    (sci.lang)