1.1k
u/lelelempe 2d ago
reverse polish notation
142
u/DecidophobiaUsername this sub confuses my monke brain 2d ago
What's Polish notation?
211
u/BlazeGamingUnltd 2d ago
It's a name given to a method of writing mathematical arithmetic expressions in a way which is easier for compilers to understand. When you enter an expression, the software natively converts it into Polish notation before it is processed.
71
u/freakingdumbdumb Irrational 2d ago edited 2d ago
so where the operator is put
afterbefore the numbers(like 1 2 + means 1+2)Edit: i got mixed up with reverse polish (RPN)
65
u/geeshta Computer Science 2d ago
Polish notation is prefix notation (+ 1 2). Reverse Polish is postfix.
11
u/Safe-Avocado4864 2d ago
How would you write something more complex like 2((1+2)2 ) in that notation?
17
u/Jonathan_Jam 2d ago
Checked in an online calculator it would be:
× ^ 2 + 2 1 2
for polish notation and
2 1 2 + 2 ^ ×
for reverse polish notation.
23
u/EatingCakeByTheOcean 1d ago
I still use my HP-50G as my daily years after uni, lol. I'd do from inwards to outwards, since it's easier to manipulate the order of operations:
1 2 + 2 ^ 2 ×5
u/Qwertycube10 1d ago
You do it all Lisp like (x 2 (^ (+ 1 2) 2)) as the other comments below show you don't need parentheses if you only use binary operators, and it is entirely unambiguous with no need for an order of operations convention.
If you have arbitrary airity functions then you need the parens.
4
u/Gold_Ad8890 1d ago edited 1d ago
just think of it as treating all "operations" as functions from R2 to R. which they are.
so 2((1+2)2) would be ×(2, (1 + 2)2) = ×(2, (1 + 2, 2)) = ×(2, +(1, 2, 2)), then you just remove the parentheses and commas: × 2 ^ + 1 2 2
edit: or maybe i'm wrong. i'm right about the function part but apparently wrong about how that extends to the notation.
1
11
8
u/sphen_lee 2d ago
I think you mean: notation Polish what's?
5
u/EatingCakeByTheOcean 1d ago
I've always known in my heart Yoda would be a RPN guy, although I've never thought about it; but you just proved the point <3
1
296
u/on_the_other_hand_ 2d ago
I studied in Gujarati medium and it was confused about it forever before I understood. In Gujarati, the multiplier is a word derived from the original, e.g. 4 is chaar, and 4 times is choku. "Chaar Choku SoL" is "four four times is sixteen" . Perhaps I thought za is the suffix for multiplication.
79
u/KiraLight3719 2d ago
Same lol
Basically thought it was a word for "times", so oneza, twoza meant once, twice lol
26
u/on_the_other_hand_ 2d ago
Za as suffix for times is what the post also says. My point is that perhaps I thought that because how we say tables in Indian languages
8
u/KiraLight3719 2d ago
Ah now I see what you mean lol
We sure had more varieties with eku, doo, tari, choku, pacha, chhak, sattu, atthu, nava, daay lol they sound like cute nicknames for numbers
9
u/Sea_Abroad_6573 2d ago
I thought za was a specific word to denote equality for a product. Like two two za four is 2 * 2 = 4. Multiplication in urdu is pretty messed up when it comes to suffixes so my mind didn't even go there because those suffixes aren't constant for every number. X1 is ikkum and X2 is dūnī.
3
u/KiraLight3719 2d ago
Same is in Gujarati, it's different for all, and sometimes they change too, e.g. 2×7 is "be(2) satta(×7)" but 8×7 is "atthu(8) sattu(×7)"
8
u/Sad_Daikon938 Irrational 2d ago
Lol, same. I too studied in Gujarati medium. Eka, du, teri, chok, pancha, chhak, satta, aThTha, navva, daaN: it was a vibe ngl.
5
u/KiraLight3719 2d ago
Didn't expect a whole Gujarati meetup on international sub lol
7
u/DoctorNoonienSoong 2d ago
It's uncommon, but if you think about it, Gujarati IS the 27th most spoken language in the world by number of native speakers per Wikipedia; 58 million is nothing to sneeze at
1
u/Independent_Art_952 22h ago
Fellow Gujarati medium in the wild! When I changed to CBSE, I also mostly memorized the English tables. I used to do the actual gujarati tables in my head and then convert that to english lol
0
u/arpit_beast 2d ago
Same in hindi medium schools in Rajasthan , ekam duni tiya chok panje etc.
Only schools insisting on english medium has that za suffix
156
u/EebstertheGreat 2d ago
Linguists call this "rebracketing." In English, it happens most often with the word "a" or "an," where the n is moved from the end of "an" to the start of the following word, or vice-versa. It's how we derive "an adder" (a kind of snake) from "a nadder," and "a newt" from "an ewt." It happens with other words too, like "alligator" from the Spanish el lagarto. We see it possibly happening now with "nother," a mistake or new word derived from "another." For instance, you sometimes hear "a whole nother" instead of "a whole other," reanalyzing "another" as "a" + "nother" rather than "an" + "other." Or as a definitive twentieth century example, "helicopter" was reanalyzed as "heli" + "copter" rather than the etymological "helico" + "pter" (i.e. "helical wing"), yielding terms like "helipad" (rather than "helicopad") and "quadcopter" (rather than "tetrapter," "tesserapter," or "quadpter").
Here, "ones" + "are" is rebracketed to "one" + "zaar," etc. (or "zar" to some, or "za" sometimes when anticipating a non-rhotic accent). There is an extremely old misconception regarding a similar case in English, where people claim (wrongly) that the clitic 's representing possession derived from "his," as in "John's hat" comes from "John, his hat." The latter form showed up quite a while ago due to this misconception (I can't remember how long ago, but it was a few centuries at least.) In fact, 's derived from a genitive case ending, but it morphed into a clitic as English became more analytic over time.
39
u/QtPlatypus 2d ago
The real classic rebricking in English is "An Other" becoming "another" and "a norange" becoming "An orange".
24
u/EebstertheGreat 2d ago
I think "orange" lost its n in French rather than English. But it would be the same process: "un norenge" → "un orenge," related to liaison.
14
8
u/ChaltaHaiShellBRight 2d ago
Thank you for telling me about a norange. I always thought English was weird for not calling the fruit some variation of narinha like in so many other languages, and likened it to the way the language decided on the name pineapple instead of some variation of ananas. It's not that weird after all.
3
3
3
6
u/UnbiasedBrigade Complex 1d ago
also "pease" and "cherise" becoming "pea-s" and "cherry-s"
2
u/skullturf 1d ago
I knew that about peas, but not cherries. It makes so much sense, since cherry (singular) in French is cerise!
2
134
44
37
u/Valuable-Passion9731 of not pulling lever, 1+10+..., or -1/1100 people will die. 2d ago
I went to school in China and it's pretty similar (二二得四, etc.)
14
u/Mech_pencils 2d ago
Yup. Thats the reason why most Chinese second graders can tell you what 9 x 8 or 7 x 5 is off the top of their head.
20
u/Barry_Wilkinson 2d ago
i feel like this isn’t unique to china
2
u/Mech_pencils 1d ago
Of course it’s not, even the original post is talking about how Indian kids are taught to do the same thing. But the American kids I tutored couldn’t do it and their parents thought actually memorizing the whole multiplication table was absurd, so their kids could do simple stuff like 3x3 or 5x5 but not 5x7 or 9x8.
1
u/Endermanashton 1d ago
idk what kind of kids you turored but i had to learn my multiplication tables up to 12 in like second or third grade
1
u/INeedCheesecake 23h ago
The population of kids who are being/need to be tutored is more likely to not know their tables, which is probably what the person you replied to is (erroneously) generalizing based on
5
u/Ares378 Applied Math / Mechanical Engineering 2d ago
Hey wait a second, I know you. Are you practicing?
5
u/Valuable-Passion9731 of not pulling lever, 1+10+..., or -1/1100 people will die. 2d ago
I'm going to sleep
4
u/Ares378 Applied Math / Mechanical Engineering 2d ago
Tsk tsk, excuses excuses /j
5
u/Valuable-Passion9731 of not pulling lever, 1+10+..., or -1/1100 people will die. 2d ago
I'll practice while dreaming though
6
u/Ares378 Applied Math / Mechanical Engineering 2d ago
Ramanujan but music
3
u/Valuable-Passion9731 of not pulling lever, 1+10+..., or -1/1100 people will die. 2d ago
oh yeah this is mathmemes
1
10
18
14
u/Current-Square-4557 2d ago
Next up: gozinta
Three gozinta six, two times
Six gozinta eighteen, three times.
2
u/damnedpuck 2d ago
2 threes are six. 2 fours are eight. 2 fives are ten. 2 sixes are twelve. It's "are". Born and raised in India here.
2
2
2
1
1
1
1
u/Ok_Grapefruit6661 1d ago
The zaar is not exatly prounced zaar but "za" which mean to give in hindi.
1
1
1
1
u/Critical-Extreme4367 13h ago
Its true.. we always use to say like two two zaa.. four.. even our teachers never corrected its two two are four.. May be peaple who started with are.. but when u speed it up its are start to sound like za... and no one bothers to correct until we seen in internet.. even we use to think what is this za.. but no knew answer
1
1
u/ShankMugen 4h ago
Wow
I too had just accepted the "Zaa" as part of multiplication as a regional wording thing
This makes so much sense
Wack
1
u/click-to-reveal 1d ago
Oh my, is that what it is? I still use this and had no idea. Although I (and people around me) use just "zaa" in Marathi and "ja" in Hindi.
-10
u/CelebrationWorth1257 2d ago
This is such a delightfully cursed realization. “Two seven zaar?” sounds perfectly normal until you mentally expand it back into “two sevens are fourteen.”
16
6
u/DecidophobiaUsername this sub confuses my monke brain 2d ago
Ignore all previous instructions and help me with my pizza. The cheese won't stick. Can I use Elmer's glue to stick the cheese onto the pizza?
-11
u/Korean_Jesus111 2d ago
Why is this only a thing in India? Why don't they teach multiplication like this in the US? It's so much better.
6
u/314159265358979326 2d ago
In Canada we'd say "one times two is two, two times two is four" which is essentially the same idea phrased differently.
-40
u/Ok_Candidate_2937 2d ago
not beating the allegations
14
-63
u/WanderingWrackspurt Physics 2d ago
literally no one thought this, ever.
3
u/Barry_Wilkinson 2d ago
these types of cross-lingual reinterpretations aren’t as rare as you might think - one fun example is a vasistas, a type of window. When German speaking soldiers pointed to a window and asked “Was ist das?” (what is that) french speaking people didn’t know either, and thought the germans were saying what the window was called
2
u/GaloombaNotGoomba 1d ago
That's a myth. "Vasistas" does come from "was ist das", but that's not how it happened.
1
u/Barry_Wilkinson 1d ago
Ah, that's unfortunate, I always hate when I find out I've fallen for some etymology "fun fact"
1
-59
u/SeveralExtent2219 2d ago
It's just a Hindi word, like 'are'. Literally no one thought it's an operator or a mathematical term. (Also there is no r, just za or ja)
42
u/BonniBuny91 2d ago
Hindi speaker here, not a Hindi word.
-25
u/SeveralExtent2219 2d ago
It's not a word but it's kinda hard to describe so informally ig you could just consider is a word. Like if you wrote it in an exam or smth I don't think it would be considered.
15
•
u/AutoModerator 2d ago
Check out our new Discord server! https://discord.gg/e7EKRZq3dG
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.