BOMDAS Vs BODMAS



Simon Biber posted:


In general you do not achieve the correct answer by multiplying first or
by dividing first, but rather by working left to right.


Yes I am well aware of how C operator precedence works -- I was referring
to the way human beings do math.

On the European side of the Atlantic, we learn BOMDAS rather than BODMAS,
and this would lead us to interpret the following line differently:

4 * 12 / 3 * 8


C compiler interpretation: 128

American interpretation: 128

European interpretation: 2

--

Frederick Gotham
.



Relevant Pages

  • Re: BOMDAS Vs BODMAS
    ... C compiler interpretation: 128 ... European interpretation: 2 ... we're all in agreement that they have the same precedence in C; ... which avoids any ambiguity in the first place. ...
    (comp.lang.c)
  • Re: BOMDAS Vs BODMAS
    ... C compiler interpretation: 128 ... American interpretation: 128 ... European interpretation: 2 ... times twelve thirds times eight can equal two. ...
    (comp.lang.c)
  • Re: BOMDAS Vs BODMAS
    ... C compiler interpretation: 128 ... European interpretation: 2 ... Euh. ... times twelve thirds times eight can equal two. ...
    (comp.lang.c)

Loading