this post was submitted on 07 Dec 2023
526 points (87.6% liked)
Asklemmy
43874 readers
2617 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What's rpn and how does base 12 work.
Don't you still have "numbers" between 11 and 12?
You would have numbers 0-9 plus two more digits (could use A and B, but any two symbols will do). The advantage is being able to cut things in thirds and quarters as well as in half. Cutting by a sixth is a bonus, as well.
RPN (reverse polish notation) is a different way of doing arithmetic where the order you write it naturally determines the order of operations. Do you know those Facebook memes where people get different answers for seemingly simple math equations? RPN does away with that. There is one and only one right way to interpret an RPN equation, and you don't have to remember any order of operation rules to do it.
Here's a practical explanation of RPN.
Take the simple expression
1 + 1
. The plus sign is between the two operands; this is called infix notation and it's what you're probably familiar with. If we wanted to make this more complex, e.g.1+(2*3)
, we'd need parentheses to say which part was supposed to be done first.Reverse Polish Notation (RPN) means you write the two operands and then the operator, i.e.
1 1 +
. Writing more complex equations is as simple as putting another expression in place of one of the numbers:1 2 3 * +
. To see how you'd evaluate this without any parentheses, imagine that as you go through an RPN expression from left to right, you keep a stack of sheets of paper, each with a number written on it, that starts out empty. As you go through, you see:If we wanted to rewrite that expression to be (1+2)*3 instead, we could write:
1 2 + 3 *
Simply by reordering the symbols, we change the meaning of the expression, so there's never any need for parentheses.
As a bonus, this method of writing equations is a lot easier for computers to parse than infix notation, since they think in terms of stacks anyway. They can be (and often are) programmed to parse infix notation anyway, because infix notation is a lot easier for humans to wrap their brains around, but it's much easier to program them to interpret RPN which is why a lot of older calculators and software (like the programming language FORTH) use RPN exclusively.
Let me know if that explanation made sense.