• FishFace@piefed.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    17 hours ago

    How are you gonna write 2 + 2 ÷ 2 with repeated addition?

    The definition of Multiplication as being repeated addition

    That doesn’t mean it has to be expanded first. You could expand 2 + 2 × 3 as (2+2)+(2+2)+(2+2) and you are unable to tell me what mathematical law prohibits it.

    If this were a universal law, reverse polish notation wouldn’t work as it does. In RPL, 2 2 + 3 × is 12 but 2 3 × 2 + is 8. If you had to expand multiplication first, how would it work? The same can be done with prefix notation, and the same can be done with “pre-school” order of operations.

    Different programming languages have different orders of operations, and those languages work just fine.

    Your argument amounts to saying that it makes the most sense to do multiplication before addition. Which is true, but that only gives you a convention, not a rule.