this post was submitted on 03 Dec 2023
4 points (100.0% liked)

196

16394 readers
1753 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
top 22 comments
sorted by: hot top controversial new old
[–] mindbleach@sh.itjust.works 2 points 10 months ago

Different compilers have robbed me of all trust in order-of-operations. If there's any possibility of ambiguity - it's going in parentheses. If something's fucky and I can't tell where, well, better parenthesize my equations, just in case.

[–] Pavidus@lemmy.world 1 points 10 months ago (1 children)

There's quite a few calculators that get this wrong. In college, I found out that Casio calculators do things the right way, are affordable, and readily available. I stuck with it through the rest of my classes.

[–] queue@lemmy.blahaj.zone 1 points 10 months ago (1 children)

Casio does a wonderful job, and it's a shame they aren't more standard in American schooling. Texas Instruments costs more of the same jobs, and is mandatory for certain systems or tests. You need to pay like $40 for a calculator that hasn't changed much if at all from the 1990's.

Meanwhile I have a Casio fx-115ES Plus and it does everything that one did, plus some nice quality of life features, for less money.

[–] AceFuzzLord@lemm.ee 1 points 10 months ago

If you're lucky, you can find these TI calculators in thrift shops or other similar places. I've been lucky since I got both of my last 2 graphing calculators at a yard sale and thrift shop respectively, for maybe around $40-$50 for both.

[–] LopensLeftArm@sh.itjust.works 0 points 10 months ago (1 children)

The correct answer is 16. Multiplication and Division happen at the same level of priority, and are evaluated left-to-right.

[–] onion@feddit.de 0 points 10 months ago

No it's ambiguous, you claiming there is one right answer is actually wrong.

[–] arisunz@lemmy.blahaj.zone 0 points 10 months ago (1 children)

this comment section illustrates perfectly why i hate maths so much lmao

love ambiguous, confusing rules nobody can even agree on!

[–] onion@feddit.de 0 points 10 months ago

The problem isn't math, it's the people that suck at at it who write ambigous terms like this, and all the people in the comments who weren't educated properly on what conventions are.

[–] Elderos@sh.itjust.works 0 points 10 months ago (1 children)

In some countries we're taught to treat implicit multiplications as a block, as if it was surrounded by parenthesis. Not sure what exactly this convention is called, but afaic this shit was never ambiguous here. It is a convention thing, there is no right or wrong as the convention needs to be given first. It is like arguing the spelling of color vs colour.

[–] And009@reddthat.com 0 points 10 months ago (3 children)

BDMAS bracket - divide - multiply - add - subtract

[–] SamVergeudetZeit@feddit.de 0 points 10 months ago

I will never forget this.

[–] CheesyFox@lemmy.world 0 points 10 months ago (1 children)

afair, multiplication was always before division, also as addition was before subtraction

[–] And009@reddthat.com 0 points 10 months ago* (last edited 10 months ago) (1 children)

~~Multiplication VS division doesn't matter just like order of addition and subtraction doesn't matter.. You can do either and get same results.~~

Edit : the order matters as proven below, hence is important

[–] prime_number_314159@lemmy.world 0 points 10 months ago* (last edited 10 months ago) (1 children)

If you do only multiplication first, then 2×3÷3×2 = 6÷6 = 1.

If you do mixed division and multiplication left to right, then 2×3÷3×2 = 6÷3×2 = 2×2 = 4.

Edit: changed whitespace for clarity

[–] Johanno@feddit.de 0 points 10 months ago

4 would be correct since you go left to right.

[–] Tlaloc_Temporal@lemmy.ca 0 points 10 months ago (1 children)

BEDMAS: Bracket - Exponent - Divide - Multiply - Add - Subtract

PEMDAS: Parenthesis - Exponent - Multiply - Divide - Add - Subtract

Firstly, don't forget exponents come before multiply/divide. More importantly, neither defines wether implied multiplication is a multiply/divide operation or a bracketed operation.

[–] And009@reddthat.com 0 points 10 months ago (1 children)

Exponents should be the first thing right? Or are we talking the brackets in exponents..

[–] SmartmanApps@programming.dev 1 points 7 months ago

Brackets are ALWAYS first.

[–] sunbather@beehaw.org 0 points 10 months ago* (last edited 10 months ago) (1 children)

8÷2(2+2)=2(2+2)÷2(2+2)

alternatively if 8÷2(2+2)=16 that means 2(2+2)=8÷16 in other words 8=0,5 which it isnt

[–] rasensprenger@feddit.de 0 points 10 months ago* (last edited 10 months ago) (1 children)

your first line is correct, but while it looks like 1 (and it might be under different conventions), evaluating according to standard rules (left to right if not disambiguated by pemdas) yields

2(2+2)/2(2+2) = 2(4)/2(4) = 2*4/2*4 = 8/2*4 = 4*4 = 16

Using implicit multiplication in quotients is weird and really shouldn't happen, this would usually be written as 8/(2*(2+2)) or 8/2*(2+2) and both are much clearer

Your second argument only works if you treat 2(2+2) as a single "thing", which it looks like, but isn't, in this case

[–] sunbather@beehaw.org 0 points 10 months ago* (last edited 10 months ago) (1 children)

not much to refute in the argument of whether its 16 or 1 as its all a matter of convention in the end and ultimately the root of the argument is poor formatting of the expression, im used to implicit multiplication taking precedent and that 2(2+2)===2*(2+2) and that for my first argument having the same expression on 2 sides of a division sign automatically equals 1, but how come you find implicit multiplication in quotients weird? seeing as it happens literally all the time in equations, unless thats a difference in school systems or similar im unaware of

for fun also rewrote the expression into powers of 2 and indeed depending on how you go about implicit multiplication i end up with either 2⁰ or 2⁴, so for the sake of sanity i figure its best to just say x₁=1; x₂=16

[–] rasensprenger@feddit.de 0 points 10 months ago

It's weird because usually the people writing the expressions want to communicate clearly, and stuff like 1/2x is not immediately clear to everyone, so they write the 1/2 as a fraction.

The same expression on both sides of the division sign only reduce to one if they actually bind to the division sign, which is rarely an issue, but that is exactly the thing that is in question here. I think it's clear that 1 + 1/1 + 1 is 3, not 1, even though 1+1 = 1+1.

But as you said, of course, the evaluation order is just convention, you can just as well write everything in https://en.m.wikipedia.org/wiki/Reverse_Polish_notation