• sipas (2/6/2013)


    BODMAS says:

    B Brackets first

    O Orders (i.e. Powers and Square Roots, etc.)

    DM Division and Multiplication (left-to-right)

    AS Addition and Subtraction (left-to-right)

    It actually doesn't matter whether you do the division or multiplication first, but it's easier to keep track if you work left to right.

    So:

    2 + 5 x 6 / 10 = 2 + 30 / 10 = 2 + 3 = 5

    2 + 5 / 10 x 6 = 2 + 0.5 x 6 = 2 + 3 = 5

    Of course you should always remove any possible ambiguity by using brackets to make it clear what your intention is.

    Actually it does matter. Within a given precedence level, always work left-to-right -- don't give precedence to an operation on the same level.

    For example, take

    8 / 4 x 2

    The correct way is left-to-right:

    8 / 4 = 2 x 2 = 4

    If we do division first, we get the same answer, as it's still left-to-right. But if we do multiplication first, we get:

    8 / (4 x 2 = 8) = 1

    It's the difference between

    8

    -- x 2

    4

    and

    8

    -------

    4 x 2

    Edit: clarified a bit - and then corrected the spelling on the clarification.