• 0ops@piefed.zip
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    4 days ago

    I wouldn’t say that it’s ambiguous, you’ll only get one answer evaluating in PE(M|D)(A|S) order left to right (your second one), enter it into any calculator and you should get 9.

    For sure, how it’s written is unconventional and easy to misread if I’m in a hurry, but honestly that’s an issue of misleading typography, not ambiguous notation. The ÷ symbol takes a lot of space (plus it looks sort of like a +) and the implicit multiplication against the parentheses doesn’t, so when I read too fast my brain might instinctively calculate each side of the division first because they sort of look like two terms. But doing that violates the left-to-right rule.

    • Mistic@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      3 days ago

      enter it into any calculator and you should get 9

      Have you tried it, though? My Casio says it’s 1

      That’s because it treats 2(1+2) as 2x and not 2*x

      It’s called juxtaposition and is the reason why people find this notation ambiguous. Some people account for it, some not. Same with calculators. The scientific ones are most likely to give you an answer of 1

      Edit: Look, this one even warns you about the implicit multiplication1000061536