Calculators work the way they do because of tradition. Sure, William_Ashbless, you can write a program like that now, that will work on a standard calculator. Could you write one that would work on the standard calculator 10 years ago? 20? 40? What happens when your arbitrary program overflows the stack on those? What happens when there isn’t a stack at all? Cheap calculators work like they do because they used to have to work like that. And there are people who have used calculators that long and expect them to work the same.
Plus, let’s say that I’ve input some expression that evaluates to 4568, for example, then I realize that, actually, I overcounted. What I really want is 1/4 of that. If I hit / 4, I want to get 1/4 of what’s on the screen, not the correct interpretation of the entire expression by the order of operation rules. If the screen is only large enough to display the last result, then that should be the only information the calculator has, too. If it’s large enough to display the expression and the result (as nicer ones are), then it will use that information. Just as it should, obviously, be, to the naive observer.
All my calculators correctly solve 2+3*4=14. Well, 7 of them, anyway. The 8th one has dead batteries, but I’ll assume it will do so as well. Apparently scientific calculators are programmed better than your average dollar-store special.
To those arguing with Whack-A-Mole about order of operations: cut it out. He’s correct. Any mathematician who sees “2 + 3 x 4 = __” on a blackboard and writes “20” oughta get himself bitch-slapped. They didn’t drill “Please Excuse My Dear Aunt Sally” into my skull because it was fun.
Incidentally for more calculator weirdness, eter “3.141592654 - pi”. You get a result similar to 4.E-10. or maybe 4.102 E-10. This is because the calculator stores the value as pi with more than the 7 decimal digits displayed.
No doubt some calculators do it correctly…as they all should. Many still give you “20” as an answer though as the Windows Standard Mode calulator will attest to.
Actually I vaguly recall a calculator manual that stated that equations must be converted as I stated above for you to get the correct answer. Also the Palm OS calculator gives the answer as 2+3*4 = 20 FWIM, got a palm by any chance **William_Ashbless
**?
I would guess the reason for this is that is was simpler for a calculator to be programed this way when they 1st came out - maybe the only way to make them affordable at the time, and people now expect them to work that way.
Perhaps you expect your washing machine to go down to the river and beat your cloths on some rocks?
Calculators come in several basic species. The really simple four-function calculators that you can get for a dollar or two, that just add, subtract, multiply, and divide, and maybe do square roots, but nothing fancier—all of these, as far as I have seen, perform arithmetic operations in exactly the order they’re keyed in, without regard to the algebraic rules about order of operations. (The calculator doesn’t see “2+3*4”; it only sees one thing at a time: first the 2, then the +, etc.) Windows’ calculator’s Standard mode is an emulation of these simple cheapo calculators.
Then you have your scientific calculators. These are the ones that can do exponents, logs, trig functions, parentheses, and whatever else is built into them. These, without exception, do know and follow the algebraic rules for order of operations.
So basically, I’m agreeing with NormanConquest here: the cheapo calculators aren’t wrong, they’re just designed to perform a different task: to do individual operations rather than to evaluate expressions.
Just because a calculator doesn’t use the standard mathematical notation doesn’t mean it’s wrong. It may be less convenient, but OTOH, sometimes it’s more convenient to use “from left to right” or reverse polish evaluations.
Written calculations use by default the standard operator ordering, but unless the calculator writes out “2+3*4” on the screen, I don’t think it’s unreasonable to use a different method, provided this is made clear. Now we are settling on a convention that they do use the standard notation, which is great, but they didn’t always, often for fairly good reasons (I guess)
Does this ultimately boil down to the simplistic nature of a calculator? It can do 1 thing at a time and does it in the order you tell it, just like a person. You enter:
you enter–calculator thinks
2----------ok, i will start with 2
±---------now i have to add something to 2
3----------2+3, simple enough it’s 5 ----------now i gotta do 5 times something
4----------54 is an even 20–i’m smart
Well, yes. But all the scientific calculators I have seem to do it this way:
[list]
Ok, you entered 2. Cool.
Now you want to add something to that. Ok, keep your shirt on.
3? ok, but that’s not what i would have picked.
Ohhhh, multiplication!
Times 4? Ok, then.
At last!
The eq
Well, yes. But all the scientific calculators I have seem to do it this way:
[ul]
Ok, you entered 2. Cool.
Now you want to add something to that. Ok, keep your shirt on.
3? ok, but that’s not what i would have picked.
Ohhhh, multiplication!
Times 4? Ok, then.
At last!
The equals key!
OK, hold on while I evaluate the entries: 2 + 3 * 4 = 2 + (3 * 4) = 2 + 12 = 14.
Yay!
[/ul]
To insist that a calculator has to follow the rules established for a written equation is just silly. A calculator is expected to calculate as it goes along which you are not expected to do as you write. They are different things and both valid as long as you are aware of the rules to be followed. My scientific Casio fx-17 gives the result as 20 and I have no problem with that. A calculator is a useful tool as long as you understand how it works.
Scientific calculators (AFAIK) and graphing calculators do wait until the = key (or enter) is pressed before running the PEMDAS (please excuse my dead aunt sally) process. But just a regular desk calculator only does 1 piece of the puzzle at a time in the order it is punched. It was kinda off topic but that was the effect i was going for. I do understand what you’re saying though.
My calculator is ‘scientific’ in that it … well, says so on the case. Dn’t know the model number off the top of my head. Not really the point.
All of the calculators I have had have properly done the… bedmas/pedmas, pemdas, whatever… process.
But I’m a cheap bastard and have yet to buy a calculator that stores up an entire equation, waiting for the = to be hit to calculate.
All of the calculators I have owned have behaved this way. They calculate-as-they-go, but they still obey the proper order of operations. Its a fairly straightforward ‘trick’ – on the calculator detecting that it has to handle a higher order operator, it holds off the calculation, but the moment that’s not true, even if the = hasn’t been hit, it can legitimately calculate the preceeding hunk of the equation.
Maybe a ‘regular desk calculator’, whatever that means, would ignore the order of operations for simplicity, but cost cannot be a reasonable factor, so the only answer is that such calculators are pandering to those who have never learned the order of operations properly or to those for whom, for some mystic reason, the order of operations is a detriment. I guess it doesn’t really matter as long as you know how the particular calculator works.
No biggy!
And boy, have we wandered off down the garden path.
Back to the OP, its interesting to note that a programming puzzle I was forced to beat my head against last night involved the calculation of PI by way of Archimedes’ area or edge approximation around a circle via a, inscribed polygon. Yet another interesting mechanism for calculation of nontrivial values.
Um, on sober reflection, I apologize if I offended anybody. The net has a tendency to drop my sarcasm and wit packets (must be stabilized in IPV6), and I got up in a cranky mood this morning.
Indeed we have and I apologize for it (but I did enjoy the discussion).
My reason for initially pointing it out was in regard to the OP. Clearly different calculators do math differently. Whether it is order of operations, calculating Pi…whatever. For most day-to-day tasks it probably doesn’t matter overly much. However, if your calculations demand a precision that is out of the ordinary you might want to run a few trial calculations through to determine what the calculator is doing and adjust your inputs accordingly (or go buy a different calculator).
I meant having an LCD 8-digit display and only 1, 2, 3, 4, 5, 6, 78, 9, 0, ., +, -, X, /, MC, MR, M+, M-, CE, C, and ON buttons. Sometimes OFF buttons.
Wow! Reading this thread made me think how mine was probably the last generation that still had to learn how to do math with pencil and paper. I was born in 1965 and remember the pocket calculator revolution of the 70s vividly.
It came just late enough that I still learned multiplication tables by route in 4th grade. Do they still makes kids memorize these (they should). Then, ug, mastering long division in 5th grade.
Fortunately, by the time I was taking Regents Algebra in middle school calculators were considered practical and my teacher, just for fun, showed us how you calculated a square root on paper! We were all really glad we didn’t have to master that!