Login
You're viewing the code4lib.social public feed.

Replies

  • Jul 30, 2026, 4:31 AM

    @SmartmanApps my brain silently screamed BODMAS so all the helping my daughter with her homework must have affected me, I don't remember learning it in school

    💬 0🔄 0⭐ 4
  • 💬 1🔄 0⭐ 2
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 1
  • Jul 30, 2026, 3:26 PM

    @fraggle @SmartmanApps @Tattooed_Mummy Both are lies-to-children. At a deeper level, multiplication and division are the same operation, and therefore have the same operator precedence; similarly for addition and subtraction. It follows that the expression in the poll is ambiguous, and either *both* answers are correct, or *no* answer is correct.

    💬 1🔄 0⭐ 0
  • Jul 30, 2026, 7:46 AM

    @SmartmanApps

    So, this has blown up.

    My 2 cents...

    Order of operations

    ÷ and × are at the same point in order of ops....

    So it just reads left to right. 18 ÷ 3 = 6
    6 × 2 = 12

    💬 0🔄 0⭐ 5
  • Jul 30, 2026, 3:36 PM

    @Arapalla @SmartmanApps Mathematicians don't accept "evaluate left to right" in this context. Because the two possible bracketings of the expression give different answers, the whole is considered to be ambiguous and therefore ill-formed. (The more I comment on this thread, the more I am coming around to the hard-line "both answers are *wrong*, because the expression is ill-formed" position.)

    💬 1🔄 0⭐ 0
  • Jul 30, 2026, 12:09 PM

    @SmartmanApps you keep telling people it's not ambiguous or unclear, but it clearly is. As evidenced by people not being sure which order is obviously correct.

    The notation is confusing and unclear without parentheses. I don't care how many textbooks have it without parentheses, I don't care if every textbook has it without parentheses. They're also bad. Order-of-operations is, and always has been, a terrible thing to rely on for clear mathematical communication.

    💬 0🔄 0⭐ 5
  • Jul 30, 2026, 3:31 PM

    @aatch @SmartmanApps It's ambiguous on the level of mathematical definitions, not just on the level of "people won't understand this". PEMDAS is a lie-to-children. Multiplication and division are, mathematically speaking, the same thing, and therefore have the same precedence. (See my other responses in this thread for more detail.)

    💬 2🔄 0⭐ 0
  • Jul 30, 2026, 6:49 PM

    @aatch Having now seen the "other responses", which weren't showing up for me before, let me be even more explicit: The "within a precedence tier, evaluate left to right" rule that @SmartmanApps appears to be insisting on is not used by professional mathematicians. If it appears in grade school math textbooks, that too is a lie-to-children. (1/2)

    💬 1🔄 0⭐ 0
  • Jul 30, 2026, 6:57 PM

    @aatch @SmartmanApps The actual rule used by professional mathematicians is: Within a precedence tier, when the order of evaluation matters, you *must* write explicit parentheses to show the intended order.

    In practice this hardly ever comes up, because non-associative mathematical structures are unusual, and because professional math notation has better ways to write both possible interpretations of "a÷b×c".

    💬 2🔄 0⭐ 0
  • Jul 30, 2026, 11:09 PM

    @zwol @aatch
    ""within a precedence tier, evaluate left to right" rule that @SmartmanApps appears to be insisting on" - not me, nope.

    "If it appears in grade school math textbooks, that too is a lie-to-children" - it's not a lie, it's a convention. All conventions obey the actual rules. People get wrong answers from not following either

    "The actual rule used by professional mathematicians is" - so in other words they've forgotten the actual order of operations rules

    💬 1🔄 0⭐ 0
  • Jul 31, 2026, 1:11 AM

    @SmartmanApps @aatch You didn't need to tell me the same thing nine times.

    I'm not going to respond any further until you bring an argument more substantial than "but grade school maths textbooks say ..." As a maths educator you should know every lie-to-children in those books for what it is. And the thing you're insisting upon is most definitely one of them.

    💬 1🔄 0⭐ 0
  • Jul 31, 2026, 2:23 AM

    @zwol @aatch
    "You didn't need to tell me the same thing nine times" - so don't say the same thing 9 times to begin with

    "more substantial than "but grade school maths textbooks say ..." - because you don't believe textbooks? 🙄 BTW it's in high school textbooks too

    "As a maths educator you should know every lie-to-children in those books for what it is" - there AREN'T any lies in them! 😂

    "the thing you're insisting upon is most definitely one of them" - it most definitely isn't!

    💬 1🔄 0⭐ 0
  • Jul 31, 2026, 3:10 AM

    @SmartmanApps @aatch *All* textbooks contain lies-to-children. It's unavoidable. One cannot help but simplify matters when writing a textbook.

    To persuade me of your claim, I would need to see evidence based on the practices of working mathematicians. Textual analysis of all the equations in a wide variety of math journal articles, for instance. If "a ÷ b × c" really is unambiguous, then constructs like it should appear frequently and pass without comment.

    💬 1🔄 0⭐ 0
  • Jul 31, 2026, 3:16 AM

    @zwol @aatch
    "*All* textbooks contain lies-to-children" - nope, none

    "It's unavoidable" - no it isn't

    "To persuade me of your claim" - says person providing no evidence of any textbooks with "lies" in them 🙄

    "I would need to see evidence based on the practices of working mathematicians" - just type it into a calculator . Only e-calcs, written by programmers, not Mathematicians, will give you a wrong answer

    💬 1🔄 0⭐ 0
  • Jul 31, 2026, 6:44 PM

    @SmartmanApps ... So you're just going to double down on your insistence that textbooks are infallible? Textbooks are secondary sources. If textbooks disagree with actual practice, it is the textbooks that are wrong.

    If you won't accept that then there is no point continuing this conversation.

    💬 1🔄 0⭐ 0
  • Jul 30, 2026, 3:07 PM

    @SmartmanApps From what I remember of my math and comp sci lesson, × and ÷ have the same priority and as such are resolved left to right

    💬 0🔄 0⭐ 0
  • Jul 30, 2026, 3:29 PM

    @gkrnours @SmartmanApps They do have the same priority, being fundamentally the same operation. In programming languages that does mean they are resolved left to right (usually); however, in proper mathematics, in any case where the ordering matters, the expression is considered to be ambiguous and therefore flawed (like, I'd put "add some parentheses to equation 3 please" if I saw this in a paper I was reviewing).

    💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Jul 30, 2026, 5:02 PM

    @gkrnours @Colinvparker @SmartmanApps It does matter, though, because x-y+1 might mean x-(y+1) which *is* different. If, in context, this is obviously meant to be a polynomial in two variables then we can trust that x + (-y) + 1 is the correct interpretation, but in some other contexts I would still demand parentheses or reordering.

    💬 3🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Aug 2, 2026, 8:10 AM

    @SmartmanApps @Colinvparker @zwol
    you put the actor at the wrong place, like an actor putting the bracket at the wrong place :3

    In my opinion, the person writing the formula should add the bracket so their intent is clear. Maybe they [have learnt/misremember/are used to a weird programming language where] × have priority on ÷ and they meant 18÷(3×2) but omitted the bracket because it's superfluous in their head. With the bracket, everyone agree. Plus you can rewrite it 2(18÷3)

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Jul 30, 2026, 3:18 PM

    @SmartmanApps *Both* answers are correct, or arguably both answers are incorrect!

    Multiplication and division have the same operator precedence, which means the expression `a ÷ b × c` is ambiguous; it could be reasonably interpreted as *either* `a ÷ (b × c)` or `(a ÷ b) × c`.

    If both interpretations are valid, then both 12 and 3 are correct. If the ambiguity makes the expression ill-formed, *no* answer is correct. "Only one of these is correct" is wrong, no matter which one.

    💬 2🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • Jul 30, 2026, 3:21 PM

    @SmartmanApps I voted for 3 so I could see the results, but this was a semi-arbitrary choice on my part (following my usual practice of trying to vote for what will be the least popular option, in any poll where I have no opinion or disagree with the premises).

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Jul 30, 2026, 5:15 PM
    I would argue that anyone who thinks the answer isn't 12 mis-expressed what they meant to write as (18 / (3*2)). That's on them. I note also that elementary schools in different countries teach different orders-of-operation, so claiming that there's a "correct" answer other than left-to-right-as-presented, when the author declines to specify, is not, actually, correct.
    💬 0🔄 0⭐ 0