Posts: 80
Threads: 11
Joined: Aug 2003
i started reading this qbasic book i have. i was reading about evaluating numeric expressions & the expression below was on one of the pages:
18 / 3 ^ 2 + 4 * 2 = 18 / 9 + 4 * 2
= 2 + 4 * 2
= 2 + 8
= 10
my question is why was the division done before the multiplication?
here are 10 types of people, those that understand binary & those that dont. . .
Posts: 1,813
Threads: 284
Joined: Mar 2003
I *believe* that when two different expressions within one expression have the same priority (such as Addition/Subtraction and Mult/Div) then they just go from left to right.
earn.
Posts: 5
Threads: 1
Joined: Sep 2003
*BEDMAS* - thats the order in which it goes
iMe 2 pLae ThE gAmE
Posts: 2,020
Threads: 24
Joined: Jun 2002
They used to teach in schools that multiplication came before division and addition came before subtration. This is wrong because:
x / y = x * (1/y)
x - y = x + (-1 * y)
so division and multiplication are given the same priority, as well as addition and subtraction. they no longer teach that multiplication comes before division.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 309
Threads: 15
Joined: Jul 2003
They were never supposed to teach multiplication before division or addition before subtraction, but when you list the order of operations one has to go before the other. Unfortunately many students (and probably some teachers) take
Parenthesis
Exponents
Multiplication
Division
Addition
Subtraction
to mean multiplication and addition come first. I like to use
Parenthesis
Exponents
Multiplication/Division
Addition/Subtraction
when I explain order of operations. It puts multiplication with division, and adiition with subtraction on the same levels, but it kind of messes up PEMDAS.
hrist Jesus came into the world to save sinners, of whom I am first.(I Timothy 1:15)
For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)
Posts: 2,020
Threads: 24
Joined: Jun 2002
They were never supposed to because that's wrong, but that's how my old precalc teacher and both my parents were taught, going to different schools in different states.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 1,845
Threads: 44
Joined: Aug 2002
We were learnt: Hooggeachte Meneer Van Dalen wacht Op Antwoord, which is a dutch sentence, and you should look at the capitals in the sentence:
H : Haakjes / Partenthesis
M : Macht / Powers
V : Vermenigvuldigen / Multiplication
D : Delen / Division
O : Optellen / Add
A : Aftrekken / Subtract
It should be done in that order, but of course that is WRONG!
Posts: 80
Threads: 11
Joined: Aug 2003
thanx guys. i was taught PEMDAS. thats why i was confused.
here are 10 types of people, those that understand binary & those that dont. . .
Posts: 3,368
Threads: 195
Joined: Jan 2003
Me:
Parentheses
Exponentiation
Turning Divisors Into Multiplicators
Multiplication
Addition
Subtraction
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 1,845
Threads: 44
Joined: Aug 2002
You forgot 'Turning Subtractions into Additions'
lol