132

Not sure if DevRant material, but I am hecking bamboozled. What else have I calculated wrong.

Comments
  • 10
    Wtf? Why the fuck is android not following bodmas!!
  • 3
    Ok, i get it. Because they want calculation to be instantaneous.. they should provide way to opt out of this
  • 5
    @HoloDreamer applying the order of ops really introduces that much overhead?
  • 8
    Didn't realize New Zealand was so weird and apperently Canada do this as well, but we call the acronym bedmas where the e stands for exponents
  • 9
    @f03n1x in the US its PEMDAS Parentheses, Exponents, multiplication/division, addition/subtraction
  • 3
    @CCTrollz ah yeah I saw that in one of the Google results brackets and parenthese
  • 33
    In this case Android is right and Casio is wrong.
    http://mathmagical.co.uk/Mathematic...
  • 14
    @hbbq I think so too. The Casio multiply the result of the parenthese (3) with the 2 first. And then divide the 6 by 6 = 1.
    But Android sees after sum up the parentheses 6 ÷ 2 × 3 = 9

    9 is right ;)
  • 3
    I hope someone, expect me, can understand what I mean xD

    (My english isn't so good)
  • 1
    @HoloDreamer Android actually is following bodmas (at least how I have been taught bodmas) :)
  • 1
    @hbbq not to me....not at all

    I grew up with PEMDAS and the one on the left makes me want to cry. I say the answer is 1. 😋
  • 0
    @f03n1x what's the "b"?
  • 2
  • 4
    @twoFour1009 you got to remember that, according to PEMDAS, M and D are of equal value (as is A and S). For adjacent Ms and Ds the "left to right" rule is used.
  • 1
  • 3
    Multiplication ad division are equal, so you go from left to right.
  • 3
    You have to add the multiplication symbol before the parentheses to make it work. But I also tend to forget it, maybe that's why I've failed so many exams.
  • 0
    BOMDAS or BODMAS?
  • 5
    8008.
  • 0
    @chzbgr M and D is equal
  • 3
    Now try this in php...

    $a = true and false;

    The statement is false, but $a is true because '=' has precedence over 'and'.
  • 0
    This is why i always use a multiline calculator
  • 1
    tl;dr: both calculators make sense.

    There is no single convention about the precedence of "no operator". Consider the expression 4/2x. If you ask Wolfram, it will parse it as (4/2)*x. If you ask Google, it will parse it as 4/(2*x).

    The important thing to note is that it's incorrect to talk about precedence of _operations_ (semantics) since precedence is property of syntax, so we should talk about precedence of _operators_ (syntax). In this case, we have two different operators: * and the "no operator" if you will. The both eventually map to the same function, but this does not mean their precedence must be the same.
  • 2
    Personally I read and write 1/2x to mean 1/(2*x), like many other people. But when there is any doubt, we should use conventional notation and use parentheses.
  • 4
    @PhantomBKB no, Android is left...
    There's no right or wrong when there is no single convention.
  • 1
    First operations in parenthesis, then multiplications and divisions, and then additions and subtractions. Operations with same priority must be executed in order.

    Android is right, Casio is wrong
  • 0
    @ajfaura do you read 1/2x as (1/2)x? If you do, ask your friends or colleagues. Certainly this is not the only possible reading: there is no single convention in this case.
  • 0
    Y'all should spend some time with haskell to learn to write foolproof equations
  • 0
    You know what the right solution is? Use parenthesis!

    Group terms with parents, and you won't be in this confusion.
    6 ÷ (2 * (2+1)) for 1
    (6 ÷ 2) * (2+1) for 9

    Even still.. 9 is right without parents because M and D are on the same level, thus you go from left to right.
  • 0
    @rrmhearts When in doubt, add parenthesis until it's unreadable but correct.
  • 1
    @bittersweet the important part being that it is correct. You can also make it readable.. spaces, highlighting, using multiple lines.. etc

    If people are getting multiple different answers, readability doesn't really matter.. it's obviously not readable.
  • 0
    @rrmhearts True! Just reminds me of complex sql queries where a select or where starts with (((((((((((, and you have to decipher or parse it from an error log 😁
  • 0
    @bittersweet Yeah, it can be challenging. One of my classes in school was taught in scheme.... Brrrrr. Avoid at all costs... Indent continually.
  • 0
    @elazar in German schools we learn to go from left to right also in Germany / isn't the same as ÷. / is a fracture which would be treaded like 1/(2*x) while ÷ is treaded like (1÷2)*x because it's a division.
  • 3
    Parenthesis > exponents > multiplication > division > addition > subtraction

    Why would there be multiple orders? Why should there be room for interpretation? Math isn't subjective.

    The same expression should always produce the same result regardless of language, region, culture, planet, etc. To do any different is disastrous.
  • 1
    @hbbq but....but....
    I do see your point tho.... 😊
  • 1
    And they say today's smartphone could take you to Moon in 1971
  • 0
    @PhantomBKB your proof does not take into account the fact that different syntax can have different precedence, even if it maps to the same operation. Precedence is syntactic, not semantic.
  • 0
    #teambomdas
  • 1
    @Ashkin But most mathematicians will consider addition and subtraction on one tier, to be interpreted left to right without looking at the symbols. Same for multiplication and division.
  • 1
    Just use this you will be fine
    *horizontal image*
  • 1
    I've always been taught to interpret 6÷2 (2+1) as 6÷(2×(2+1))... has my life been a lie up to this point?
  • 0
  • 0
    My life has been a lie
  • 0
    I use brackets all the time because of this behavior. Cant go wrong anytime :) . It is maybe unreadable for the first time but you will get used to it.
  • 0
    I’m so disappointed 😔 all developers should at least know how to solve this simple problem. Parentheses, exponents, multiplication, division, addition, subtraction. If you don’t believe it check Wikipedia https://en.m.wikipedia.org/wiki/....

    The answer is 1. Just 1. Not 9. Never ever will it be 9. The 9 that the phone gave was the result of crappy code.

    Gahh, the level of disappointment I’m feeling is astounding
  • 0
    6÷2X3 is too ambiguous to be meaningful, blindly following BODMAS gives 9, but it also makes sense that if you have written like this you mean that 2X3 is in denominator, solution is "use brackets properly"
Add Comment