Re: use rpl for deriving rpl functions Message #8 Posted by peacecalc on 16 Nov 2011, 5:42 a.m., in response to message #7 by Bart (UK)
Hello folks,
thank you for your replies.
First of all: I have to observe that my english abilities are more low-grade, then I thought (that's right: I'm not a native speaker).
I've learned that the book format is the same as what I call: algebraic terms. Book format is better,
because f. e.: x y z ^ * is also an algebraic term (in RPN format).
With derives i meant "symbolic derivatives".
I try it a second time to explain what I want. Maybe some observations are helpful:
The HP 50g needs relativly a long time for the function SUBST on a formular in book format compared
with the formular transformed in a function in RPN format
and the substituting variable is the variable of the function.
For example:
2: (x + 3*y)/(x^2 - 17)
1: x = 6 SUBST
takes more time for calculating then:
A function f is defined as:
<< -> x << x y 3 * + x 2 ^ 17 - / >> >>
1: 6 f
Of course the SUBST command is more general acting like the other way (for y you have to build a new function).
The conversion of a formular from book format in a rpn function is no problem: You need the little program "->RPN" in the
Advanced User Reference for the HP 50g on page 2-27. Then it's easy to build a function f (with USER RPL) mentioned above.
But the point is: You always get a result in book format:
(6 + 3*y)/19
My assumption is/was that the transformation between book and RPN format is an overhead which makes the symbolic calculations slow.
I also assumed that the hp 50g works internally with "trees" which represent the algebraic terms. I thought this was necessary
doing symbolic algebra and showing the book format.
If you have a list of an algebraic term in RPN format you needn't such a "tree", only a stack for storing the results in between.
That is a good condition for calcs with an infinit large stack. You use the serial order and the type of operators which are given in
RPN format. And you can do this also for symbolic algebra directly f. e.: symbolic derivatives.
The information of David Hayden is interesting: the book format is stored in RPN format. If it is possible to get an access (with user rpl) to that
storage places, than it is not necessary to make that conversion from book to RPN format.
for example: Input: { x 3 ^ 5 x 2 ^ * + } recursive function output: { 3 x 2 ^ * 5 2 x * * +}
One more assumption: some sophistcated functions, like "SERIES" could run faster (now may be, is sys rpl necessary).
Please tell me wether things become clear/clearer or not. I thank you for the time you've invested understanding my post(s).
Yes Bart that's what I want with a little correction:
1: X 2 ^ X LN * INTVX
1: X 3 ^ 3 / X LN * X 3 ^ 9 / NEG +
sincerely
peacecalc
|