Python to RPN converter
|
10-18-2024, 12:14 PM
Post: #57
|
|||
|
|||
Bug Report: Python to RPN converter
The following function is not translated properly:
Code: def f(a, b): This is the generated code for the HP-42S: Code: LBL "f" However CHS should be executed after the addition of a and b. This calculates -a + b instead. Compare it with the disassembly of the function f: Code: 1 0 RESUME 0 This is the abstract syntax tree of the expression -(a + b): Code: Module( It looks good to me. Therefore, I assume that it is a problem in the method visit_UnaryOp of RecursiveRpnVisitor: Code: def visit_UnaryOp(self, node): |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)