Careful, you’ll summon Smartman Apps (with emojis) to insist mathematics has exactly one perfect unambiguous syntax, where 2*(1+3) is somehow different from 2(1+3), and also reverse Polish notation does-too have parentheses.
I dunno
Submitted 4 months ago by LadyButterfly@piefed.blahaj.zone to science_memes@mander.xyz
https://piefed.cdn.blahaj.zone/posts/Ao/vN/AovNhRmmeHwHDFK.jpg
Comments
mindbleach@sh.itjust.works 4 months ago
ExtremeDullard@piefed.social 4 months ago
5 isn’t a valid function name, is obviously the right answer.
merc@sh.itjust.works 4 months ago
Depends on the language.
marcos@lemmy.world 4 months ago
I’m pretty sure that’s a module operator…
gnutrino@programming.dev 4 months ago
It could be a Church Numeral in which case function application is the same as addition and the answer is actually 10…
TheRedSpade@lemmy.world 4 months ago
How can you be sure it’s not defined when we only see one line?
Voroxpete@sh.itjust.works 4 months ago
They didn’t say it’s not defined, they said it’s not a valid name. Most languages don’t allow function names to start with a number, so 5 literally cannot be a function if that’s the case…
But that’s assuming this isn’t some really obscure language.
sangriaferret@sh.itjust.works 4 months ago
The education system did not fail me. I failed my education.
I_Fart_Glitter@lemmy.world 4 months ago
PEMDAS bitches.
agedcorn@lemmy.world 4 months ago
Please Excuse My Dear Aunt Sally… bitches.
funkless_eck@sh.itjust.works 4 months ago
KyuubiNoKitsune@lemmy.blahaj.zone 4 months ago
It’s interesting that you can somewhat tell where you are from based on this, I learned it as BODMAS
sbeak@sopuli.xyz 4 months ago
I learned BODMAS too! It seems BIDMAS is another one (British I think), PEMDAS is the weird American one, BEDMAS is a thing too. You’re able to vary the first letter (parenthesis or brackets), second letter (indices/exponent/“order” or “operation”), and the order of multiplication/division (MS or SM) and addition/SUBTRACTION (AD or DA)
Very interesting indeed.
Endmaker@ani.social 4 months ago
Where are pemdas and bodmas users from?
anamethatisnt@sopuli.xyz 4 months ago
I never ran into PEMDAS while growing up, in Sweden I’ve always been taught of it as the following order of operations:
- P
- E & Roots
- M & D
- A & S
Truscape@lemmy.blahaj.zone 4 months ago
Technically roots are a form of exponent, just fractional (square root is power of 1/2, for instance). I can see how it could be easier to conceptualize when you break it down like that though. Neat to see the differences compared to the US breakdown :)
Truscape@lemmy.blahaj.zone 4 months ago
Presuming PEMDAS is our order of operations and the 5 next to the parentheses indicates multiplication…
2+5(8-5) -> 2+5(3) -> 2+15=17
Other than adding a multiplication indicator next to parentheses for clarification (I believe it’s * for programming and text chat purposes, a miniature “x” or dot for pen and paper/traditional calculators), this seems fine, yeah.
…I worry about how many people may not understand solving equations like these.
Alaknar@sopuli.xyz 4 months ago
Multiplication sign is not required in situations like this. Same with unknowns - you don’t have to write
2*x, you just write2x.ftbd@feddit.org 4 months ago
That’s not even an equation, just basic algebra
Cethin@lemmy.zip 4 months ago
Technically not algebra, right? Algebra is where you move things around and solve for variables, and that kind of thing. This is just arithmetic.
MonkderVierte@lemmy.zip 4 months ago
Algebra has horrible syntax. Way too much implications.
Truscape@lemmy.blahaj.zone 4 months ago
Fair enough, I’ve heard “math problem” and “math equation” used interchangeably.
Also you would be surprised how many people do not know basic algebra, at least in the US rofl
DarkCloud@lemmy.world 4 months ago
I prefer BM-DAS, no one’s out here doing exponents, and no one calls brackets “parentheses”…
Deebster@infosec.pub 4 months ago
I learnt it as BODMAS (brackets, orders, division and multiplication, addition and subtraction).
cobysev@lemmy.world 4 months ago
The way I was taught growing up, brackets are [these]. Parenthesis are (these).
Yes, technically the latter are also brackets. But they can also be called parenthesis, whereas the former is exclusively a bracket. So we were taught to call them separate words to differentiate while doing equations.
TheRedSpade@lemmy.world 4 months ago
While I never failed a math class, I also never went last high school. When would your presumptions NOT be true?
Truscape@lemmy.blahaj.zone 4 months ago
Some forms of programming syntax, although there are the fringe cases where an equation is represented by a symbol in conjunction with a parentheses input.
For example:
y(x) = 2x+3
5+y(1) = 10, as 1 is substituted in for x in the prior equation.
SSUPII@sopuli.xyz 4 months ago
I feel like I am getting trolled
Isn’t 17 the actual right answer?
marcos@lemmy.world 4 months ago
Some people insist there’s no “correct” order for the basic arithmetic operations. And worse, some people insist the correct order is parenthesis first, then left to right.
Both of those sets of people are wrong.
Petter1@discuss.tchncs.de 4 months ago
Well, this is just a writing standard that is globally agreed on,
The writing rules are defined by humans not by natural force
(That one thing and another thing are two things, is a rule from nature, as comparison)SkyeStarfall@lemmy.blahaj.zone 4 months ago
I mean, arithmetic order is just convention, not a mathematical truth. But that convention works in the way we know, yes, because that’s what’s… well… convention
MotoAsh@piefed.social 4 months ago
Hopefully you can see where their confusion might come from, though. PEMDAS is more P-E-MD-AS. If you have a bunch of unparenthesized addition and subtraction, left to right is correct. A lot of like, firstgrader math problems are just basic problems that are usually left to right (but should have some extras to highlight PEMDAS somewhere I’d hope).
So they’re mostly telling you they only remember as much math as a small child that flunked.
pixeltree@lemmy.blahaj.zone 4 months ago
[deleted]SSUPII@sopuli.xyz 4 months ago
Yeah I know that. But I was feeling confused as to why it was here. That’s why I was feeling trolled, because it made me doubt basic math for being posted in a memes community.
psx_crab@lemmy.zip 4 months ago
Obviously the answer is 2+x(y)
anamethatisnt@sopuli.xyz 4 months ago
And even if you don’t simplify it to y the end result is the same
2+x(y-z) = 2+xy-xzMrSmith@lemmy.world 4 months ago
I don’t know why, but this was intuitively my first approach. Eve though it’s much simpler than that.
pewgar_seemsimandroid@lemmy.blahaj.zone 4 months ago
the answer is [Answer]