Skip Navigation

πŸ’‘πš‚π—†π–Ίπ—‹π—π—†π–Ίπ—‡ π™°π—‰π—‰π—ŒπŸ“±
πŸ’‘πš‚π—†π–Ίπ—‹π—π—†π–Ίπ—‡ π™°π—‰π—‰π—ŒπŸ“± @ SmartmanApps @programming.dev
Posts
22
Comments
591
Joined
2 yr. ago

  • multiplying by a parenthetical is different from distribution

    Ok, let's tweak it (I've practically never used RPN, but only took me a couple of minutes of research to work it out)...

    1/2x3 same as 1 2 Γ· 3 x

    1/2(3) same as 1 2 3 x Γ·

    ...and to bring it back to the original question...

    8/2x(2+2)

    8/2(2+2)

    Learn something new every day, :-) and took me no time at all to debunk your claim that it's not possible in RPN.

    (3) -6 is the quantities 3 and -6 in the format (A)B

    And what do you do with these "quantities"? Multiply them? If so then it's exactly the same as A(B). If you're talking about something else then tell me what you're talking about.

    zero thought

    I managed to work out how to do distribution in RPN, something you claimed couldn't be done, so who's the one giving zero thought?

  • That two numbers applied to division don’t form a term?

    Now you're getting it! Correct, they don't. They form an expression. Terms are separated by operators, and joined by grouping symbols. Expressions are made up of terms and operators (since, you know, operators separate terms). I told you way back in the beginning that 1Γ·2 is 2 terms, and Β½ is 1 term. Getting back to the original question, 2(2+2) is 1 term and 2x(2+2) is 2 terms.

    you find yourself an authority that you trust

    Which time that I mentioned textbooks, historical Maths documents, and proofs did you miss?

    university professor

    University professors don't teach order of operations - high school teachers do. That's like saying "Ask the English teacher about Maths".

    If you want to continue this

    Why would I want to when you ignore Maths textbooks and proofs? See my first comment in this post that you've finally got the difference now. See ya.

  • β€˜this particular notation is the notation!’ to β€˜of course other notations exist’

    The notation for division in some countries is the obelus, in other countries it's a colon. Whatever country you're in, the notation for that country is the notation for division (be it an obelus or a colon).

    Maths,” do you mean the notation on paper, or the underlying laws-of-reality stuff

    Both! Whatever notation your country uses, all the rules for Maths and use of that Maths notation are defined.

    It’s ambiguous

    No, it's not.

    It’s not distribution. It’s evaluating the parenthetical

    And Distribution applies to brackets/parentheses where they have a coefficient. In other words, same same.

    it’s 3 and -6, not 3 - 6

    You didn't put a comma between 3 and -6, so no, it's not 3 and -6, it's 3-6. That's what you wrote, that's what it is.

    a state trusts you with the education of children

    Related - have you noticed how children never get this wrong? It's only adults who've forgotten the rules of Maths who get it wrong.

    According to the textbook you’re now screenshotting at people, A(B) and (B)A are both correct - yes? They’re both valid? And spaces have no impact on an equation? And writing equations like -6 + 1 are fine, instead of (-6) + 1, since you don’t want needless parentheses?

    Yes (though the latter is unconventional), yes (though the latter is unconventional), yes, yes (though unconventional - 1-6 is the conventional way to write that), yes, yes.

  • Thus, you made a claim about semantics

    And told you what it was.

    challenged you to prove

    Which I did with a concrete example, which you have since ignored.

    I did not say β€œopposite”. I said β€œinverse”

    The inverse of div is to multiply. The inverse of frac is to invert the fraction - happy now?

    Divisions and fractions are distinct in syntax, but they still both are the same functions

    No, they're not. Division is a binary operator, a fraction is a single term.

    they both are the inverse of multiplication

    Multiplication is also a binary operator, and division is the opposite of it (in the same way that plus and minus are unary operators which are the opposite of each other). A fraction isn't an operator at all - it's a single term. There is no "opposite" to a single term (except maybe another single term which is the opposite of it. e.g. the inverse fraction).

    PEMDAS is not a rule of maths

    No, it's a mnemonic to remind people of the actual rules.

  • If frac and div are different functions, then multiplication would have two different inverses. How could that be?

    The opposite of div is to multiply. The opposite of frac is to invert the fraction.

  • I’m not asking you to explain how division isn’t associative

    I was explaining why we have the rule of Terms (which you've not managed to find a problem with).

    I’m asking you to find an n, m such that βΏβ„β‚˜ is not equal to n Γ· m

    I already pointed out that's irrelevant - it doesn't involve a division followed by a factorised term. You're asking me to defend something which I never even said, nor is relevant to the problem. i.e. a strawman designed to deflect.

    Stop being confidently incorrect

    You haven't shown that anything I've said is incorrect. If you wanna get back on topic, then come back to showing how 1Γ·Β½=1Γ·(1Γ·2) but not 1Γ·1Γ·2 is, according to you, incorrect (given you claimed division and fractions are the same thing)

    EDIT: OMG you’re on programming.dev.

    Yeah, welcome to why I'm trying to get programmers to learn the rules of Maths

  • No, I’m saying your β€œmaths” textbook is wrong

    No, you're saying every Maths textbook is wrong. You think I only have one? πŸ˜‚

  • You are a smug idiot

    That's your colloquialism for Maths teachers. Ok, got it.

    8/2(1+3) is exactly the sort of thing programs love to misinterpret.

    Programs, written by programmers, who have forgotten the rules of Maths.

    that’s fucking stupid

    So you're saying the rules of Maths are stupid. Got it.

    You can’t prove that 2(3) means something different from 2*3. It’s only convention!

    No, it's a rule of Maths - it's literally the opposite operation to factorising.

    It’s a thing we made up

    Nothing in Maths is made up. It's based on our observations of how things work.

    mathematical proofs, which are laws of the universe

    Now you're getting it.

    this particular notation

    ...which is Maths.

    Reverse Polish Notation doesn’t have this issue, at all

    Neither does infix notation. All notations have to obey the rules of Maths, since the rules of Maths are universal.

    Distribution is not even possible in RPN

    Second hit in my Google results...

    (3) -6 is asking for trouble

    It's -3 - where's the trouble?

    say 8/2*(1+3) is different from 8/2(1+3), because in the notation used by coders, they both become 8/2*4

    Welcome to why almost every single e-calculator is wrong (as opposed to handheld calculators) - MathGPT gets it right.

  • I'm not British. So you're saying Maths doesn't work the way that Maths textbooks teach it - do go on...

  • Google it if you don’t believe me

    BWAHAHAHA! πŸ˜‚ Google gets it wrong too. Try looking in a Maths textbook instead (I have plenty of them since I'm a Maths teacher).

  • 2 (4) is the same thing as 2 * 4.

    No, as I already pointed out, it's the same as (2x4). You can't remove brackets unless there is only 1 term left inside. 2x4 is 2 terms, so can't remove brackets yet.

  • inside radicals

    I had to look up what that meant (should've done that the first time - sorry) - have never heard that before, must be a local terminology.

    So, square roots (or other roots) can be expressed as an exponent - e.g. the square root of 2 is the same as 2 to the power Β½ - so that's covered by "E", exponents! (or I for Index, or O for to the Order of, depending on your area)

    I appreciate your mention of the importance of teaching the difference between operators and terms

    Thank you.

    My pedagogical background is in the sciences and I’m much better at doing math than teaching it

    Oh god, welcome to why I have so many people argue with me, a Maths teacher, about it. There's a whole bunch of Youtubes and blogs out there by Physics majors. I'm like "OMG, why are you trusting someone with a Physics major over someone with a Maths major - god help me".

    I would like if math classes (in my area) did more explicitly teach the difference between terms and operators

    So what area are you in? A country will do. You said PEMDAS so I'm guessing the U.S.? I've heard via Youtubes/blogs that indeed there is more confusion with what is taught there, but I ended up Googling for U.S. textbooks, and found the same thing being taught in the textbook, so I'm not sure where this "that's not what they teach in the U.S." is coming from (why I was Googling for U.S. textbooks in the first place). Is the standard of teachers there actually worse than elsewhere? Or is it perhaps (possibly more likely) that there's just more U.S. people posting, therefore more people who've forgotten the actual rules, and are just (as I've seen many times) they're just blaming it on what they were taught (which I've usually found isn't true at all).

  • Ok, that's a start. In your simple example they are all equal, but they aren't all the same.

    yn+y - 2 terms

    y(n+1) - 1 term

    yΓ—(n +1) - 2 terms

    To see the difference, now precede it with a division, like in the original question...

    1Γ·yn+y=(1/yn)+y

    1Γ·y(n+1)=1/(yn+y)

    1Γ·yΓ—(n +1)=(n +1)/y

    Note that in the last one, compared to the second one, the (n+1) is now in the numerator instead of in the denominator. Welcome to why having the (2+2) in the numerator gives the wrong answer.

  • Your added parentheses do nothing

    So you're saying Brackets aren't first in order of operations? What do you think brackets are for?

    If you wanted to express the value 8 over the value 2*(1+3), you should write 8/(2*(1+3))

    or, more correctly 8/2(1+3), as per the rules of Maths (we never write unnecessary brackets).

    That is how you eliminate other valid interpretations

    There aren't any other valid interpretations. #MathsIsNeverAmbiguous

    what human being is going to read β€œ8/2 * (1+3)” as anything but 4*4

    Yes, that's right, but 8/2x(1+3) isn't the same as 8/2(1+3). That's the mistake that a lot of people make - disobeying The Distributive Law.

    Those spaces

    ...have no meaning in Maths. The thing that separates the Terms, in your example, is the multiply. i.e. an operator.

    most calculators don’t have a spacebar

    ...because it's literally meaningless in Maths.

    any more than they have to ability to draw a big horizontal line and place 2(1+3) underneath it

    Some of them can actually.

    β€œThe rules of math” you keep spamming about are not mathematical proofs

    You should've read further on then. Here's the proof.

    they’re arbitrary decisions made by individuals

    No, they're a natural consequence of the way we have defined operators. e.g. 2x3=2+2+2, therefore we have to do multiplication before addition.

    In many cases the opposite choice would be equally sensible

    2+2x3=2+6=8 the correct answer, but if I do addition first...

    2+2x3=4x3=12, which is the wrong answer. How is getting the wrong answer "equally sensible" as getting the right answer?

    Do you want to argue that 8 - (2) + (1+3) should be 2?

    No, why would I do that? 8-(2+1+3) does equal 2 though.

  • Do you not understand that syntax is its own set of rules?

    Yes, the rules of Maths, as I was already saying. I'm a Maths teacher. I take it you didn't read the link then.

  • Are you for real?

    Yes, I'm a Maths teacher.

    A fraction is a shorthand for division with stronger (and therefore less ambiguous) order of operations

    I added emphasis to where you nearly had it.

    Β½ is a single term. 1Γ·2 is 2 terms. Terms are separated by operators (division in this case) and joined by grouping symbols (fraction bars, brackets).

    1Γ·Β½=2

    1Γ·1Γ·2=Β½ (must be done left to right)

    Thus 1Γ·2 and Β½ aren't the same thing (they are equal in simple cases, but not the same thing), but Β½ and (1Γ·2) are the same thing.