Post Reply 
Negative numbers with exponents in RPN
01-28-2021, 08:36 AM
Post: #8
RE: Negative numbers with exponents in RPN
(01-28-2021 07:18 AM)john gustaf stebbins Wrote:  
Quote:Perhaps you did the pasting and squaring in textbook or algebraic mode? In those modes, -2 x^2 will produce the result -4 because the x^2 operation has higher precedence than the negative sign. One of the advantages of RPN is that there are no operator precedence rules.

Yes this is the mode I was working in. It means that when I copy a previous result, it gets edited by the default entry mode. The system should have invisible parenthesis or even visible ones when you copy so that the result is not messed with by the editor.

I see what you are getting at. The copy and paste functions are really just copy and pasting text but you want it to be pasted as an isolated sub-expression surrounded by parentheses when necessary. "Hidden" parentheses would be a bad idea though. What you see on the input line is what you should get.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Negative numbers with exponents in RPN - ijabbott - 01-28-2021 08:36 AM



User(s) browsing this thread: 1 Guest(s)