Help with a Program
|
12-11-2020, 10:01 PM
Post: #1
|
|||
|
|||
Help with a Program
I have a program tossing a DATA ERROR on the v41 software halting on line 62. I'm trying to run a stack trace to see why it's failing. Any help is appreciated.
Code:
|
|||
12-11-2020, 10:06 PM
Post: #2
|
|||
|
|||
RE: Help with a Program
I suspect that line 62 is trying to raise a negative number to a fractional power, which the 41 cannot do, but says "DATA ERROR" instead.
It would help us if you gave us a hint about the program's purpose and inputs. <0|ΙΈ|0> -Joe- |
|||
12-12-2020, 01:24 AM
Post: #3
|
|||
|
|||
RE: Help with a Program
I think I found my error, i got lost in my flow chart and forgot to actually finish the program
|
|||
12-12-2020, 04:13 AM
Post: #4
|
|||
|
|||
RE: Help with a Program
I think I found an error in an equation. But im not sure how to implement this equation in rpn efficiently with 4 stacks.
T is a variable and the c_* arguments are constants. (c0+T*(c1+T*(c2+T*(c3+T*(c4+T*(c5+T*(c6+T*(c7+T*(c8+T*(c9)))))))))) any help is greatly appreciated |
|||
12-12-2020, 05:43 AM
(This post was last modified: 12-12-2020 05:45 AM by Craig Bladow.)
Post: #5
|
|||
|
|||
RE: Help with a Program
Assuming T is present in the X register, your program could fill the stack with T using a series of ENTER commands. Then the program basically works from C9 to C0 doing something like this in RPN for each constant: C9 * C8 + * C7 + * .......
This takes advantage of the stack duplicating the value in the T register when an operation, * in this case, causes the stack to drop. Try CC41! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)