Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Polish notation
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Explanation== The expression for adding the numbers 1 and 2 is written in Polish notation as {{nowrap|+ 1 2}} (prefix), rather than as {{nowrap|1 + 2}} (infix). In more complex expressions, the operators still precede their operands, but the operands may themselves be expressions including again operators and their operands. For instance, the expression that would be written in conventional infix notation as {{block indent|(5 β 6) Γ 7}} can be written in Polish notation as {{block indent|Γ (β 5 6) 7}} Assuming a given [[arity]] of all involved operators (here the "β" denotes the binary operation of subtraction, not the unary function of sign-change), any well-formed prefix representation is unambiguous, and brackets within the prefix expression are unnecessary. As such, the above expression can be further simplified to {{block indent|Γ β 5 6 7}} The processing of the product is deferred until its two operands are available (i.e., 5 minus 6, and 7). As with ''any'' notation, the innermost expressions are evaluated first, but in Polish notation this "innermost-ness" can be conveyed by the sequence of operators and operands rather than by bracketing. In the conventional infix notation, parentheses are required to override the standard [[Order of operations|precedence rules]], since, referring to the above example, moving them {{block indent|5 β (6 Γ 7)}} or removing them {{block indent|5 β 6 Γ 7}} changes the meaning and the result of the expression. This version is written in Polish notation as {{block indent|β 5 Γ 6 7.}} When dealing with non-commutative operations, like division or subtraction, it is necessary to coordinate the sequential arrangement of the operands with the definition of how the operator takes its arguments, i.e., from left to right. For example, {{nowrap|Γ· 10 5}}, with 10 to the left of 5, has the meaning of 10 Γ· 5 (read as "divide 10 by 5"), or {{nowrap|β 7 6}}, with 7 left to 6, has the meaning of 7 β 6 (read as "subtract from 7 the operand 6").
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Polish notation
(section)
Add topic