• Michael Ossipoff
    1.7k
    I'll call Polish Notation "FPN", for "Forward Polish Notation".

    RPN has at least one useful advantage over RPN:

    The operations are entered on a calculator or added to the notation as they come up in the evaluation of an expression.

    ...whereas, with FPN, it's necessary to initially enter the all the operations, in reverse order of their occurrence among the operands.

    (...as encountered in expression-evaluation. ...e.g. from left to right, numerators before denominators)

    But does FPN have any advantage over RPN?

    Michael Ossipoff
  • Michael Ossipoff
    1.7k
    Typo correction:

    In the 2nd sentence of my post, I meant to say:

    RPN has at least one useful advantage over FPN.

    Michael Ossipoff
  • noAxioms
    1.5k
    Either one requires a stack, but an operation consumes less space than a number, so the FPN stack takes fewer resources to implement the worst case stack.

    I could be wrong about this.
  • noAxioms
    1.5k
    That's a weak advantage. It takes more instructions (calculator key presses) to code with FPN.
    RPN 3,15+ (where comma is <enter>)
    FPN +3,15, <-- extra comma
  • Michael Ossipoff
    1.7k


    Thanks for pointing out the possible worst-case-memory-use advantage of FPN.

    Maybe in the earlier days of computers, such an advantage could have been crucial.

    And thanks also for pointing out the fewer-instructions/keypresses advantage of RPN.

    I hadn't looked at it closely enough to notice that.

    It adds to RPN's other advantage--the convenience of entering each operation as it's encountered among the operands.(Instead of first initially going through and entering all the operations in reverse order of occurrence among the operands).

    Thanks again for pointing those things out.

    Michael Ossipoff
bold
italic
underline
strike
code
quote
ulist
image
url
mention
reveal
youtube
tweet
Add a Comment

Welcome to The Philosophy Forum!

Get involved in philosophical discussions about knowledge, truth, language, consciousness, science, politics, religion, logic and mathematics, art, history, and lots more. No ads, no clutter, and very little agreement — just fascinating conversations.