14,000 hints and counting!

The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Be aware of a Calculator widget bug
Authored by: chyna4xena on May 24, '05 10:43:10PM
It is nonsense to suggest that the implied order of operations "cannot be right or wrong" - it is right, in the sense that failing to adhere to it will give you the wrong results.

People writing equations are always going to follow the rules, because there are no other alternative "conventions". If there is only one "convention", and it must be followed for accuracy, then it is not a convention at all, but a rule.

If you receive the equation a + b * c, then the correct formula is a + (b * c) because the person writing the equation would have written (a + b) * c if they had meant it to be computed that way. They are not going to think "well, under a different convention, a + b * c does equal (a + b) * c, so its OK to leave it un-parenthesised when what I mean is (a + b) * c".

You said it yourself: "there are often competing conventions for things until a field is well-developed enough that a standard emerges" (my emphasis). The field of arithmetic is indeed well developed, and the implied order of operator precedence is indeed a standard.

And, for reference, scientific and graphical calculators, along with programming languages, did not adopt any mathematical "conventions". They adopted a rule which was already (long, long already) a standard, and they had no choice but to do that. The notion that they arbitrarily chose from amongst a selection of possible implied orders of operation is just plain wrong.

As for the calculator widget, I would not call its behaviour a bug - because the behaviour is clearly intended, and it is correctly re-creating the behaviour of the device it is emulating. A calculator that can only handle dual-operand operations isn't buggy or wrong (it correctly calculates those dual-operand operations), just feature-poor.
10.4: Be aware of a Calculator widget bug
Authored by: thelamecamel on May 25, '05 05:06:12AM

I am most of the way through a 2nd year university course that deals with defining and constructing numbers, addition, multiplication etc. Our PEMDAS convention could have easily been different (say PEASDM), in which case you would get 1+2*3=9.

Of course, we do use PEMDAS when we normally write equations, so if I wrote down 1+2*3, it should be evaluated as 7.

BUT, THIS CONVENTION ONLY HOLDS FOR WRITTEN FORMULAE - there are no axioms about pocket calculators!

Whoever built the first pocket calculator established a new convention for inputting equations, which is sometimes more useful, and often less useful. This convention was established presumably because calculators originally could not handle PEMDAS. The Dashboard widget, as others have remarked, is meant to simulate a cheap, pocket calculator. It is not a scientific calculator.

Written arithmetic is a slightly different language to what you type into a calculator - even a scientific calculator (Would you ever write 4^2 on paper?). Making the languages as similar as possible is useful for people who have written down, mathematically formatted equations to evaluate. But when i'm working out what I want to do as I go along, the pocket calculator arithmetic language is often more useful to me.

The other problem with observing PEMDAS, as highlighted above is that it's mighty confusing without a visible record of what you've typed so far, which would really complicate the widget.

Widgets are fast access programs that you want to use briefly. Whenever i want to make a quick calculation, pocket-style calculators are faster and easier to use. If I want PEMDAS, then i'm doing something more complex, and chances are i'll be evaluating a whole bunch of equations and so would be better served by a proper application.

10.4: Be aware of a Calculator widget bug
Authored by: chyna4xena on Oct 25, '06 06:51:56PM

quote - "Whoever built the first pocket calculator established a new convention for inputting equations, which is sometimes more useful, and often less useful. This convention was established presumably because calculators originally could not handle PEMDAS"

That is not correct.

The first pocket calculators (and cheap ones since) did not establish a new convention for inputting equations at all. They only performed operations on two operands at a time (without exception, this is all that they do) so there was no 'convention' needed about inputting formulae! PEMDAS conventions, etc, have no relevance whatsoever to dual-operand instructions.

That is the point that has been continually missed throughout this discussion - a dual-operand calculator and PEMDAS have [b]nothing[/b] to do with each other.

Then they made calculators which could handle multiple-operand instructions (ie 'equations' or 'formulae'), and at this time, they adhered to the ONLY rule that has ever been accepted for determining the order of operation - PEMDAS.

You say that there are "no axioms about pocket calculators" when you should say, "there are no [b]specific[/b] axioms about pocket calculators because of course they would obey the same rules that everyone else, and everything else, is obeying."

quote - "Written arithmetic is a slightly different language to what you type into a calculator - even a scientific calculator (Would you ever write 4^2 on paper?)."

That is a furphy. The difference between "4^2" and a "4" with a superscripted "2" is zero - there is no difference between them. They are the same number ... 16.

The written language of arithmetic, and the language of scientific calculators, is identical, because scientific calculators were specifically designed to correctly calculate the written language of arithmetic, and they were specifically designed to obey PEMDAS in multi-operand equations.