--- In
50g@yahoogroups.com, "alanthegringo" <alanthegringo@...> wrote:
>
> After entering an equation with the equation writer, with one
variable
> such a 'x', how do you evaluate 'x' for the equation?
> It seems like using the equation writer might be easier than
> programming. For programming, do you start with << >> button, and
> finish with the left arrow prg button?
> My old HP15c was simple to program; an example would be:
> g prg
> f prgm
> f LBL A
> STO 0
> SIN
> 1/x
> STO1
> RCL 0
> g x^2
> 3
> /
> RCL 1
> X
> g RTN
> g PRG
>
> if x = 3, then f(x) = 21.26 (using radians)
> Could this be programmed easier with the HP50G?
> Thanks
>
Here is one of the possible equivalent in HP50:
<< -> a << a SIN INV a SQ 3 / * >> >>
where "<<" is the double caret program delimiter, and "->" is the
little assignement arrow.
Save that program by entering a variable name on the stack,
say "Demo", and pressing STO>. This will add a soft key labelled
Demo, and using the program is only a matter of entering the "x"
walue you want to use (actually, it is called "a" in the program...)
and pressing the soft button corresponding to Demo.
One thing to remember is that the HP50 does not use explicit memory
reference (STO 1; RCL 0) to access data; it does so symbolically,
hence the assignement to "a" at the beginning of the program, which
takes whatever value is on the stack and puts it into "a". From then
on, anytime it sees "a", the calculator will bring back the current
value of "a".
In your program, you are saving the result of 1/SIN(x) into memory 1
(STO 1); in the case of the program above, I just leave that value on
the stack, something you could also have done with your HP15; but if
retaining that value is significant in a more elaborate program, it
could have been put in another local variable by adding the statements
-> b
and then using "b" instead of "RCL 1". Just remember that having a
value assigned with the -> function calls for using anotehr layer
of "<< >>" delimiter, as the local variable applies to that sub-
function.
CBVG