A Matter Of Convention |
|
|
My lastest posts can be found here: Previous blog posts:
Additionally, some earlier writings: |
A Matter of Convention - 2011/05/09
Some people were claiming it's 9, and others were claiming it's 1. And it all depends on whether you think of it as:
To put it into computing terms, it's the difference between:
So which is it? Without prior knowledge, and trying to work it out from scratch, for yourself, with no experience and no advice, there is nothing to choose between these. To reduce ambiguity, and to ensure there is no possibility of misunderstanding, we can bracket the expression fully, and then there is no doubt. But over time, and performing many calculations, that becomes incredibly tedious. So tedious that a shortcut must be made, and the shortcut that has evolved is to say that
The short answer is that there is no short answer. To some extent you simply need a convention, and this is as good as any other, except that when you deal with many expressions over many calculations, you find that this one is easier. In some sense it feels more natural. Multiplication "binds more closely," and addition comes after. More, there is really no such thing as division or subtraction, there is only multiplying by the inverse, and adding the negative. In a sense it's like silver service. Food should be served from the left, and plates removed from the right. It is simpler that way, but it could be a different combination. It's a convention. If we all do it the same way, we all know what to expect, and life is made a little easier. There's no reason to drive on the left or the right, so long as we all do the same thing. So when you have to evaluate 1+2*3 we simply have to remember that we do the multiplication first. We get 1+6, and not 3*3. When you do it often enough it becomes natural and you stop worrying about it until you have to explain it to someone who doesn't know the convention. Then suddenly it's hard again. Addendum:I've had several emails about this now, and interestingly enough they are split fairly evenly. There are two arguments:
There's still one interpretation missing, though.
That sums it up, really.
Send us a comment ...
|
Contents |
Links on this page |
|
Quotation from Tim Berners-Lee |