There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

@SmartmanApps@programming.dev avatar

SmartmanApps

@[email protected]

This profile is from a federated server and may be incomplete. Browse more on the original instance.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Nothing wrong with the way it’s written - division before subtraction.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

1/2x is also unambiguous. 2a=(2xa) by definition. Has done for at least 180 years. Terms

SmartmanApps ,
@SmartmanApps@programming.dev avatar

No, it isn’t. Division before subtraction.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Even your “BODMAS” isn’t universal, lots of people learn “PEMDAS” or “BEDMAS”

The rules are universal, only the mnemonics used to remember the rules are different

except for facebook and twitter

… and high school Maths textbooks, and order of operations worksheet generators, and…

2/2*2 It is 0.5 or 2 depending on order.

It’s always 2.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Multiplication comes before division in some forms, like PEMDAS. In the example I use, this changes the answer

If you have both multiplication and division then you do them left to right. PEMDAS doesn’t mean multiplication first, nor does BEDMAS mean division first. It’s PE(MD)(AS) and BE(DM)(AS) where the bracketed parts are done left to right.

you should specify what it is operating on

Left associativity means it always operates on the following term. i.e. terms are associated with the sign on their left.

The minus sign only applies to the middle term, by convention

By the rule of left associativity.

But if you use one of these acronyms, you end with this expression evaluating to -2

No it doesn’t. How on Earth did you manage to get -2?

all these acronyms end up being useless waste of time

No they’re not, but I don’t know yet where you’re going wrong with them without seeing your working out.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Who’s on first? :-)

SmartmanApps ,
@SmartmanApps@programming.dev avatar

You are adding more rules

I’m stating the existing rules.

If all that matters is higher orders first

I don’t even know what you mean by that. We have the acronyms as a reminder of the rules, as I already said.

I know operators apply to the numbers to their right.

If you know that then how did you get 2-2+2=-2?

With 2/22, you don’t know if it is 22/2, or 2/(2*2)

Yes you do - left associativity. i.e. there’s no brackets.

When you are dividing by numbers, you put them all in the denominator

Only the first term following a division goes in the denominator - left associativity.

BY CONVENTION, as I said. You don’t have to repeat what I said a second time.

I didn’t. You said it was a convention, and I corrected you that it’s a rule.

It’s not like you could have tried in your head different orders to combine 3 numbers.

addition first

2-2+2=4-2=2

subtraction first

2-2+2=-2+2+2=-2+4=2

left to right

2-2+2=0+2=2

3 different orders, all the same answer

SmartmanApps ,
@SmartmanApps@programming.dev avatar

The rules and the acronyms describe different things.

No, they don’t.

If you have to make more rules to say M and D are the same,

I didn’t make more rules - that’s the existing rules. Here’s one of many graphics on the topic which are easy to find on the internet…

https://programming.dev/pictrs/image/c90bc9fd-8745-41f6-a53d-ba6347a3d035.jpeg

…that’s one of the two examples you used?

Yes. Did you try looking for one and ramping it up to the most difficult level? I’m guessing not.

IT IS AMBIGUOUS IN THIS POST

No, it isn’t. Division before subtraction, always.

ALL EXAMPLES I HAVE SHOWN

None of those have been ambiguous either, as I have pointed out.

That is the problem at hand.

The problem is people not obeying the rules of Maths.

There is no real problem solving in trying to decipher poorly written shit

It’s not poorly written. It’s written the exact way you’d find it in any Maths textbook.

Python is great, but stuff like this just drives me up the wall (lemmy.world)

Explanation: Python is a programming language. Numpy is a library for python that makes it possible to run large computations much faster than in native python. In order to make that possible, it needs to keep its own set of data types that are different from python’s native datatypes, which means you now have two different...

SmartmanApps ,
@SmartmanApps@programming.dev avatar

-5**2 is apparently -25 because of the order of operations)

Which is correct

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Well, the link doesn’t load for me

Yeah, they’re doing an upgrade right now. Yes, it’s the Maths explanation - -25 is the correct answer.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

The exact problem is math is not taught correctly

Every single Maths textbook I’ve seen teaches it correctly. The issue is people not remembering what they were taught (and then programming a calculator without checking it first). Calculators

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Math should be just as deterministic as programming, but it’s not in some situations

Maths is 100% deterministic for order of operations. The issue is people not following all of the rules. Order of operations thread index

SmartmanApps ,
@SmartmanApps@programming.dev avatar

I just used the calc on window… it cannot respect order of operation

Yeah, I’ve tried several times to get Microsoft to fix their calculators. I’ve given up trying now - eventually you have to stop banging your head against the wall.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

This is why every calculator should be a RPN calculator

No, this is why programmers should (re)learn the order of operations rules before writing a calculator.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

I’ve never seen a calculator that had bracket keys but didn’t implement the conventional order of operations.

I’ve seen plenty

SmartmanApps ,
@SmartmanApps@programming.dev avatar

plus.maths.org/content/pemdas-paradox

There’s no pemdas paradox, just people who have forgotten the order of operations rules

Even two casios won’t give you the same answer:

The one on the right is an old model. As far as I’m aware Casio no longer make any models that still give the wrong answer.

https://programming.dev/pictrs/image/92eab14c-a98b-4aab-82ec-f1e1611d70da.png

SmartmanApps ,
@SmartmanApps@programming.dev avatar

A typical scientific calculator didn’t have juxtaposition, so you’d have to enter 6÷2(1+2) as 6÷2×(1+2)

That’s not true

you’d get 9 as the answer because ÷ and × have equal precedence and just go left to right

Well, more precisely you broke up the single term 2(1+2) into 2 terms - 2 and (1+2) - when you inserted the multiplication symbol, which sends the (1+2) from being in the denominator to being in the numerator. Terms are separated by operators and joined by grouping symbols.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

I think I learned powers take priority over the “-”

Yes, Exponents is the 2nd-highest precedence (after Brackets) - BEDMAS.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

it’s just a squaring a number

The number being squared is 4, unless you put (-4)², otherwise it’s 4² with a minus sign.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

I think it was something like : -2 is a diminutive for -1x2

Correct. Things that are usually left out of Maths expressions are plus signs, ones as multipliers/indices, and un-needed brackets. e.g. I could more fully write this as -1(4)², but that just simplifies to -4²

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Either ‐(n²) or (-n)². Order of operations shouldn’t be some sort of gotcha to trick people into misinterpreting you

It isn’t. With ‐(n²), n² is already a single term, so the brackets aren’t needed.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Unfortunately some calculators, such as Google’s will ignore your brackets and put in their own anyway. You just gotta find a decent calculator in the first place.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

It is also frustrating when different calculators have different orders of operations and dont tell you.

Yeah, but to be fair most of them do tell you the order of operations they use, they just bury it in a million lines of text about it. If they could all just check with some Maths teachers/textbooks first then it wouldn’t be necessary. Instead we’re left trying to work out which ones are right and which ones aren’t. Any calculator that gives you an option to switch on/off “implicit multiplication”, then just run as fast as you can the other way! :-)

SmartmanApps ,
@SmartmanApps@programming.dev avatar

My calculator says -2² = -4

That’s correct

SmartmanApps ,
@SmartmanApps@programming.dev avatar

AFAIK, this is correct to the point that I have understanding of. I’m not a mathematician

I’m a Maths teacher/tutor. The actual rules are Terms and The Distributive Law. There is no such thing as “implicit multiplication” (which is usually people lumping the 2 separate rules together as one and ending up with wrong answers).

SmartmanApps ,
@SmartmanApps@programming.dev avatar

order?

It’s actually short for “to the order of”, as in 2 squared is 2 to the order of 2. i.e. same thing as Exponent or Index.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Order of magnitude?

It’s actually short for “to the order of”, as in 2 squared is 2 to the order of 2. i.e. same thing as Exponent or Index.

SmartmanApps ,
@SmartmanApps@programming.dev avatar
SmartmanApps ,
@SmartmanApps@programming.dev avatar

I’m taking about physical, non-graphic scientific calculators from the 1990s.

Yep, exact same as the calculator in the linked thread. The expression entered was 6÷2(1+2).

SmartmanApps ,
@SmartmanApps@programming.dev avatar

The syntax is arbitrary in some edge cases

Such as?

SmartmanApps ,
@SmartmanApps@programming.dev avatar

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).

SmartmanApps ,
@SmartmanApps@programming.dev avatar

P.S. feel free to read through and use my thread on order of operations.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

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.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

multiple always happens first. But apparently it’s what’s left side first

Multiplication and division are equal precedence (and done left to right) if that’s what you’re talking about, but the issue is that a(b+c) isn’t “multiplication” at all, it’s a bracketed term with a coefficient which is therefore subject to The Distributive Law, and is solved as part of solving Brackets, which is always first. Multiplication refers literally to multiplication signs, of which there are none in the original question. A Term is a product, which is the result of a multiplication, not something which is to be multiplied.

If a=2 and b=3, then…

axb=2x3 - 2 terms

ab=6 - 1 term

https://programming.dev/pictrs/image/10f2a863-21e0-4479-ac62-5852e6be7467.jpeg

SmartmanApps ,
@SmartmanApps@programming.dev avatar

I would have got 1 by doing 2(2+2) = 8 first. Not because of bracket but because of “implied multiplication.”

Yeah, right answer but wrong reason. There’s no such thing as implicit multiplication.

What I am learning here: 8÷2(2+2) is not same as 8÷2×(2+2)

Correct, and that’s because of Terms - 8÷2(2+2) is 2 terms, with the (2+2) in the denominator, but 8÷2×(2+2) is 3 terms, with the (2+2) in the numerator… hence why people get the wrong answer when they add an extra multiply in.

number next bracket is not the same as normal multiplication in rule book

Right, because it’s not “multiplication” at all (only applies literally to multiplication signs), it’s a coefficient of a bracketed term, which means we have to apply The Distributive Law as part of solving Brackets.

÷ & × have right of way rule with whoever is left most wins

Yeah, the actual rule is Left associativity, and going left to right is the easy way to obey that.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Just proves, never too late to learn :-)

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Thanks for the effort!

You’re welcome.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

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.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

If I write f^{-1}(x), without context, you have literally no way of knowing whether I am talking about a multiplicative or a functional inverse, which means that it is ambiguous

The inverse of the function is f(x)^-1. i.e. the negative exponent applies to the whole function, not just the x (since f(x) is a single term).

SmartmanApps ,
@SmartmanApps@programming.dev avatar

If you read the wikipedia article

…which isn’t a Maths textbook!

also stating the distributive law, literally in the first sentence

Except what it states is the Distributive property, not The Distributive Law. If I call a Koala a Koala Bear, that doesn’t mean it’s a bear - it just means I used the wrong name. And again, not a Maths textbook - whoever wrote that demonstrably doesn’t know the difference between the property and the law.

This is something you learn in elementary school

No it isn’t. This is a year 7 topic. In Primary School they are only given bracketed terms without a coefficient (thus don’t need to know The Distributive Law).

be assured that I am sufficiently qualified

No, I’m not assured of that when you’re quoting wikipedia instead of Maths textbooks, and don’t know the difference between The Distributive Property and The Distributive Law, nor know which grade this is taught to.

Wikipedia is not intrinsically less accurate than maths textbooks

BWAHAHAHAHA! You know how many wrong things I’ve seen in there? And I’m not even talking about Maths! Ever heard of edit wars? Whatever ends up on the page is whatever the admin believes. Wikipedia is “like an encyclopedia” in the same way that Madonna is like a virgin.

but you are misunderstanding them

And yet you have failed to point out how/why/where. In all of your comments here, you haven’t even addressed The Distributive Law at all.

Whether you write it as a(b+c) = ab + ac or as a*(b+c) = ab + ac is insubstantial

And neither of those examples is about The Distributive Law - they are both to do with The Distributive Property (and you wrote the first one wrong anyway - it’s a(b+c)=(ab+ac). Premature removal of brackets is how many people end up with the wrong answer).

SmartmanApps ,
@SmartmanApps@programming.dev avatar

which clearly states that the distributive property is a generalization of the distributive law

Let me say again, people calling a Koala a Koala bear doesn’t mean it actually is a bear. Stop reading wikipedia and pick up a Maths textbook.

You seem to be under the impression that the distributive law and distributive property are completely different statements

It’s not an impression, it’s in Year 7 Maths textbooks.

this certainly is not 7th year material

And yet it appears in every Year 7 textbook I’ve ever seen.

Looks like we’re done here.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

You can define your notation that way if you like

Nothing to do with me - it’s in Maths textbooks.

without knowing the conventions the author uses, it’s ambiguous

Well they should all be following the rules of Maths, without needing to have that stated.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Ummm, I was agreeing with you??

Anyways, I’m a Maths teacher who has taught this topic many times - what would I know?

SmartmanApps ,
@SmartmanApps@programming.dev avatar

Exactly! It’s in math textbooks, in both ways!

And both ways are explained, so not ambiguous which is which.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

The notation is not intrinsically clear

It is to me, I actually teach how to write it.

SmartmanApps ,
@SmartmanApps@programming.dev avatar

a single sentence of a wikipedia article without me handfeeding it to you

And I told you why it was wrong, which is why I read Maths textbooks and not wikipedia.

I’m sorry for your students

My students are doing good thanks

https://programming.dev/pictrs/image/ab9ba7b9-48e2-41d3-8f01-1097ce6e3017.png

SmartmanApps ,
@SmartmanApps@programming.dev avatar

you’re just a tutor and not actually a teacher?

Both - see the problem with the logic you use?

Let me know when you decide to consult a textbook about this.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines