Wat is the rule?

1. Apr 9, 2010

sulemanasif

wat is the rule?????????????

if all the signs r present in a calculations then which sign we will operate first???? e.g.
5+7-11/22+5-55

2. Apr 9, 2010

Staff: Mentor

Re: wat is the rule?????????????

For the arithmetic operations (+, -, *, /), do them in this order:
1. multiplications or divisions

3. Apr 9, 2010

nicksauce

Re: wat is the rule?????????????

To the OP: I don't want to sound rude, but you really only need one question mark to ask a question.

4. Apr 9, 2010

Staff: Mentor

Re: wat is the rule?????????????

Also, try to eliminate the use of "textspeak": wat for what, u for you, plz for please, r for are, etc.

5. Apr 9, 2010

Staff: Mentor

Re: wat is the rule?????????????

Are you asking about arithmetic rules that should be followed, or about results of calculations when using some simple electronic calculator? Simple calculators often don't follow the rules and they execute operations in the order they are entered, no matter how they should be treated.

So, for example, 2+3/5 should be 2.6 when calculated correctly, but on some simple calculators you may get 1, as sum is calculated the moment you hit division button.

6. Apr 9, 2010

MotoH

Re: wat is the rule?????????????

Please excuse my dear aunt sally

Parenthesis

Exponents

Multiplication

Division

Subtraction

7. Apr 9, 2010

jobyts

Re: wat is the rule?????????????

The order is from left to right.

Now, that brings me to another question. In Arabic (or any natural language which reads from right to left), do they follow a right to left ordering convention for mathematics?

The difference is calculators that uses RPN (Reverse Polish Notation) or not.

8. Apr 9, 2010

jobyts

Re: wat is the rule?????????????

Not true. Multiplication and division have same precedence. Addition and subtraction have same precedence. When the precedence are same, the ordering matters. Ordering is from left to right.

9. Apr 9, 2010

rs1n

Re: wat is the rule?????????????

Well, if two operations * and / have the same precedence, it does not matter that in practice we assume * is always first followed by / (or vice versa).

10. Apr 9, 2010

jobyts

Re: wat is the rule?????????????

Right. Only in computer language context, this rule is stricter. If the data types are integers, the division could lead to zero, hence the final result would end up in zero.

11. Apr 9, 2010

uart

Re: wat is the rule?????????????

Yes but even that is language/type dependant.

Example.

In C.
Code (Text):

int k;
float x;
...

k = 10;
x = k/3;
x = 3*x;   // Result is x = 9.0

In Pascal.
Code (Text):

var k : integer;
x : real;
...

k := 10;
x := k/3;
x := 3*x;       {Result is x = 10.0}

k := 10;
x := k div 3;
x := 3*x;       {Result is x = 9.0}

12. Apr 10, 2010

Rajini

Re: wat is the rule?????????????

Hi,
i guess these rules comes mainly with programming, which automatically uses its own preferences. Personally i dont like such expression. If better use brackets, groupings and spaces..

13. Apr 10, 2010

Redbelly98

Staff Emeritus
Re: wat is the rule?????????????

The terms may be added in any order, and you will always get the same result. It may help to think of "-11/22" in terms of adding a negative 11/22:
5 + 7 + -11/22 + 5 + -55​
This is true because of the commutative and associative properties of addition. Of course, the division in 11/22 must be done first, as others have pointed out.

14. Apr 10, 2010

uart

Re: wat is the rule?????????????

No not really that much related to computer languages, the discussion just got a little side tracked in that direction. The basic rules of operator precedence are important to allow us to write mathematical expressions that are easily readable and which can be understood by anyone, without ambiguity.

Primary school kids usually get taught operator precedence in the form of a mnemonic (or is it better called an acronym?) such as "BIDMAS", which is short for "Brackets, Indices, Division, Multiplication Addition Subtraction". The above discussion was focusing on the fact that a simple mnemonic like the above is a bit incomplete as it doesn't indicate that division and multiplication really have the same precedence (as do addition and subtraction) and so should normally just be processed left to right. In practice this doesn't much matter as re-ordering mult and div (or + and -) at the same level doesn't change the result. For example with the expressions, $3 \div 4 \times 8$ and $3 \times 8 \div 4$, both of which obviously give the same result under left to right evaluation (in the context of normal maths on real numbers).

There is one exception to BIDMAS which crops up quite a lot in typeset maths and that is the "implied multiplication" commonly seen in algebraic expressions. For example if an author writes $3 \div 4x$ they almost invariably mean $3 \div (4x)$ and not the left to right evaluation of $3 \div 4 \times x$. I often use the modified mnemonic of "BIIDMAS" (*as in Brackets, Indices, Implied_Multiplication, Division, Multiplication, Addition, Subtraction) to take care of this.

*Yes I know this is kind of dumb, since the two "I" 's are ambiguous. Can someone help me think of a better letter to convey this same info. I was also thinking of "A" for "algebraic implied multipilaction", but then that would be ambiguous on "A".

15. Apr 11, 2010

sulemanasif

Re: wat is the rule?????????????

yes i am asking the arithmetic rules
which operation we will first apply???

16. Apr 11, 2010

sulemanasif

Re: wat is the rule?????????????

i didnt get it wat u said

17. Apr 11, 2010

sulemanasif

Re: wat is the rule?????????????

guys i didnt get the answer yet. plz tell me which operation will b applied first?

18. Apr 11, 2010

DaveC426913

Re: wat is the rule?????????????

Yes you did. In post #2. It is virtually impossible to be more explicit without actually answering it for you. What don't you understand about it?

19. Apr 11, 2010

Epic Sandwich

Re: wat is the rule?????????????

In even more simple terms than that (don't know why you need it more simple than that, but whatever):

--First of all you do the multiplications. For your example, 5+7-11/22+5-55 would become 5+7-11/22+5-55. Nothing would happen as there are no multiplications in it.
--Then, you do the divisions. 5+7-11/22+5-55 would become 5+7-0.5+5-55
--Next up is addition. 5+7-0.5+5-55 become 12-5.5-55
--Finally, subtraction. I hope you can do the final bit by yourself.

That's exactly what Mark said. You can do steps 1 and 2 in either order (multiplication then division, or division then multiplication), same with steps 3 and 4 (addition then subtraction, or subtraction then addition).

20. Apr 11, 2010

CRGreathouse

Re: wat is the rule?????????????

This doesn't work. 2 / 3 * 4 is 8/3, not 1/6. You need to do multiplications and divisions together, left-to-right. Similarly, additions and subtractions are done at the same step, left-to-right.