Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

49g+ displaying in RPN

23 views
Skip to first unread message

Paddan

unread,
Nov 24, 2005, 12:03:15 PM11/24/05
to
When you use algebraic mode you see the expression to the left and the
result to the right on the display, like...
----------------------------------
3+5
8
4-2
-----
3
1
----------------------------------

This is kind of nice and I wonder if that's available in RPN mode as
well?

/Toad

Brother-Peter

unread,
Nov 24, 2005, 1:28:18 PM11/24/05
to
"Paddan" <pat...@lindefors.com> wrote in message
news:1132848897....@o13g2000cwo.googlegroups.com...

If you have an Algebraic expression on the stack like above
just press NETER (or do DUP)
which leaves the original expression after the calculation
UNDO in case you forgot or
use LASTARG command (above ENTER key)
in CMD memory you have that expression (or latest 4 command lines)
and in case you where using EQW and
were extra carefull by using STO
or BEGIN-END and COPY
You have an extra copy
Naturally you could copy your Albegraics to the
external SD or inter Flash or the port 1 RAM (or perhaps port 0)
or to the PC using the USB -link
Also doing HALT helps to preserve your Stack
until you do CONT and UNDO
Just making a variable to the local memory serves well
and just in case you could do
DEPTH ->LIST 'STaK.2006' STO
you would have your current stack saved as a list
or
You could load some of the fantastic libraries from the
www.hpcalc.org
and thus extend your calculators capabilities
Maybe you write your own Stack Display Enhancement?
OR
You could just keep on using the ALG -mode
:-D


Paddan

unread,
Nov 24, 2005, 3:07:51 PM11/24/05
to
>If you have an Algebraic expression on the stack like above
>just press NETER (or do DUP)
>which leaves the original expression after the calculation

Well I dont, since I'm using RPN. I want the expression to be built and
displayed as I key it in.

>You could load some of the fantastic libraries from the
>www.hpcalc.org
>and thus extend your calculators capabilities
>Maybe you write your own Stack Display Enhancement?

It's obvoiusly allready in the calculator! Just want it enabled for the
RPN stack.

> You could just keep on using the ALG -mode

I never use alg-mode...

Heiko Arnemann

unread,
Nov 24, 2005, 3:15:53 PM11/24/05
to

"Paddan" <pat...@lindefors.com> schrieb

Yes, in case you have choosen
[MODE] (this is the "mode" key)
Number Fromat... Fix 0
You might change to the "standard" number format (recommanded),
to get 2/3 or 0.666...
The stack will look a bit different, also depending on your flag
settings.

Please refer also to the AUR (Advanced Users Reference) where *flags are
described.
I hope it is already available on
www.hpcalc.org
and if not, good luck on searching for it on
www.hp.com
or using google and search for
"AUR 49g+"
or searching in this NG for Gene Wright who gave the direct link.

And last but not least (not your question),
yes, you should use (get use to it) RPN-mode with your HP-calculator.
It is originaly made for that.

Best regards
Heiko

John H Meyers

unread,
Nov 24, 2005, 7:41:50 PM11/24/05
to
On Thu, 24 Nov 2005 11:03:15 -0600, Paddan wrote:

> When you use algebraic mode
> you see the expression to the left

> and the result displayed to the right, like...

> :3+5
> 8

> I wonder if that's available in RPN mode as well?

The nature of the ALG mode is such that it never
expects to use anything already on the stack, unless you
include the special ANS(n) function in your next expression;
in other words, all of the inputs for functions specified
in each line are explicity stated on that line.

The nature of the RPN mode is such that it most commonly
uses the information already on the stack for each
subsequent function, and in so doing,
it also "eats up" the items previously left on the stack,
replacing them with new results.

Thus, the ALG mode can afford to leave a "history trail"
behind on the stack, without affecting subsequent operations,
while the RPN mode doesn't have any such assuredly unused area
in which to leave such a history behind, in the general case
of not knowing what operations are going to come next.

You may know yourself, however, that you don't intend
to subsequently use things which you have left on the stack,
in which case you are free to leave anything you want,
such as copies of anything which you are about to
"use up" as inputs to a subsequent function.

E.g. to multiply 234 by 567 and yet remember
the original factors, you can do 234 567 DUP2 *

To evaluate '234+567' and yet remember the original expression,
you can do '234+567' DUP EVAL, and so on.

It is possible to leave an automatic "trace" on the stack
of everything you do in RPN mode, as you seem to desire,
if you don't mind cluttering up your stack; for example,
try the following program, on any HP48 or HP49 series calc,
to "trace" all functions, by leaving on the stack,
above the last result, a list of the arguments and function:

\<< DEPTH \-> d \<< LASTARG DEPTH d - 1. + \->LIST
DUP 2. OVER SIZE SUB SWAP 1. GET DUP SIZE
{ "{" SWAP + STR\-> 1. GET DUP TYPE 18. ==
{ + SWAP } { DROP2 } IFTE } { DROP2 }
IFTE "" DROP \>> \>> '\GbENTER' STO

-55. CF -62. SF -63. SF @ Required flag settings

Note that the variable name is: [GreekBeta]ENTER
(Alpha Right-shift B produces the Greek Beta character)

Left-shifted Alpha ("USER") toggles "Trace mode" on/off.

[r->] [OFF]

Paddan

unread,
Nov 25, 2005, 5:55:44 AM11/25/05
to
>The nature of the RPN mode is such that it most commonly
>uses the information already on the stack for each
>subsequent function, and in so doing,
>it also "eats up" the items previously left on the stack,
>replacing them with new results.

So!? All I want is for the expression to built while I enter it in RPN.

5 3 + [Enter] would give
5 + 3 on the stack
4 [div] would give
5 + 3
-------
4
on the stack and so on...

I mean it works if you introduce a variable X into the expression.

Another approach would be to have the expression to the left and the
stack on the right side of the screen. There's actually a RPN
implementation for the ti-89 that does this. The advantage is that if
you've entered a long expression and need to do it again you can just
recall that expression and change just the number you need to and
execute it again. And you can review the expression entered if you're
unsure if it was entered correctly.

Brother-Peter

unread,
Nov 25, 2005, 5:59:34 AM11/25/05
to
"Paddan" <pat...@lindefors.com> wrote in message
news:1132916144....@g47g2000cwa.googlegroups.com...
Use the Equation Writer or start with a non-existent variable
then later eliminate this variable (perhaps STOre 0 or 1 into it)


Paddan

unread,
Nov 25, 2005, 8:43:53 AM11/25/05
to
> Use the Equation Writer or start with a non-existent variable
> then later eliminate this variable (perhaps STOre 0 or 1 into it)

Just awkward workarounds ... By the way, why isn't EqWriter using RPN?
Would be so much simpler to enter equations that way!

Message has been deleted

John H Meyers

unread,
Nov 25, 2005, 5:32:00 PM11/25/05
to
On Fri, 25 Nov 2005 07:43:53 -0600, Paddan <pat...@lindefors.com> wrote:

> By the way, why isn't EqWriter using RPN?

Because it's an "equation" writer -- an algebraic formula editor!

The RPN editor is called the Command Line :)

> Would be so much simpler to enter equations that way!

So do what we suggested earlier -- clear flag -3
(to prevent numeric evaluation), start off with
the first part of the algebraic expression that you would
calculate in RPN mode ('5+3' in your earlier example),
then proceed to perform all the subsequent operations
(e.g. 4 / in your earlier example), and you will see
the entire expression being built by your operations.

Is this what you asked for? Then it's already built in.

[r->] [OFF]

dmac...@ppeng.com

unread,
Nov 28, 2005, 1:42:16 PM11/28/05
to

John H Meyers wrote:

> On Fri, 25 Nov 2005 04:55:44 -0600, Paddan wrote:
>
> > All I want is for the expression to built while I enter it in RPN.
>
> Clear flag -3, then type '5+3' to start things off,
> then type 4 / and see '(5+3)/4' etc. -- just as you asked!
>
> By the way, with the latter expression on the stack,
> just do \->LST and see { 5 3 + 4 / }
>
> Now, guess what happens if you start with that list,
> and then do \->ALG on it? (Try it and see).
> [r->] [OFF]

What do you mean by "\->LST" or "\->ALG"? I was unable to find the LST
key and the ALG key only brings up the Algebra menu.

>use LASTARG command (above ENTER key)

I was also wondering where the LASTARG command is that Brother-Peter
wrote about; I don't see it above the ENTER key.

Thanks for the help. Doug

John H Meyers

unread,
Nov 28, 2005, 5:12:14 PM11/28/05
to
On Mon, 28 Nov 2005 12:42:16 -0600, Doug MacNeill wrote:

> What do you mean by "\->LST" or "\->ALG"?

Type 256 MENU [Enter], then press NXT

> I was also wondering where the LASTARG command is

On 49G it's labeled ANS (above ENTER)

Or you can type the command name in short form as LAST,
or you can use the CATalog.

[r->] [OFF]

John H Meyers

unread,
Nov 30, 2005, 11:21:37 PM11/30/05
to
Here's a more streamlined version of an HP48/49
"function trace" -- leaves on the stack (in RPN mode)
a record of prior RPN calculations, a bit like
what is left on the stack in ALG mode (HP49):

\<< DEPTH \-> d \<< LASTARG DEPTH d - \->LIST
"{1 " ROT + STR\-> DUP SIZE GET
DUP TYPE 18 == { + SWAP } { DROP2 } IFTE
-55 DUP SF CF \>> \>> '\GbENTER' STO @ Greek Beta

-55 CF -62 SF -63 SF @ Required flag settings

Toggle USER mode [Left, Alpha] off/on to turn tracing off/on.

The name '\GbENTER' [starting with Alpha, Right, B]
must be used as shown.

[r->] [OFF]

Paddan

unread,
Dec 1, 2005, 5:23:16 PM12/1/05
to
Would it be possible to have the program to just add ' ' around an
expression if its an add or substract of two numbers? As far as I have
tested it's only add and substract that messes upp the equation
building in exact mode. If you enter '5' [ENTER] 3 +, youd get 8 but if
you enter '5+3' youd get 5+3 on the stack. So if the program could
check for two single numbers, [+] or [-] and add ' ' around the rest
would work as well....

/Toad

John H Meyers

unread,
Dec 1, 2005, 10:35:06 PM12/1/05
to
On Thu, 01 Dec 2005 16:23:16 -0600, Paddan wrote:

> If you enter '5' [ENTER] 3 +, you get 8

The reason is that the built-in compiler automatically simplifies '5'
to a single number to begin with; it won't generate an algebraic type
object (type 9) for a single enclosed object, except for the algebraic
functions which take no args (such as '\pi' 'e' 'i')

That's why you ought to "prime the pump" by creating
the innermost simplest part yourself, e.g.:

> if you enter '5+3' you get '5+3' on the stack.

Hooray -- now (with flag -3 cleared)
you're all set to continue further RPN operations,
which will generally continue to produce algebraic results.

> Would it be possible to have the program to just add ' '

> around an expression if it's an add or subtract of two numbers?

Well, "add ' ' around an expression" is thinking like a human,
writing text on paper, but by now you know that the HP48/49
doesn't store formulas in memory as text, but as programs
(RPN programs, in fact), and that the text-like appearance
you view in the display is a grand illusion,
the result of a cleverly cloaked conspiracy between a built-in
compiler (command line input) and decompiler (display),
but everything internal is still pure RPL!

To simply construct an algebraic by sequentially performing
RPN operations, no program is needed at all -- once you have
algebraically expressed the very first operation yourself,
then the calc takes over from there. Isn't that sufficient?

When I first thought that your goal was to leave
some sort of "history" on the stack, as in ALG mode,
then I also supplied a simple 'Vectored Enter' program,
which does something vaguely similar in RPN mode, but the calc
is going to keep building algebraic expressions anyway,
once you start off with any initial algebraic expression,
and that program would only document a history
of operations performed, not influence the result in any way.

So what are you looking for now?

Do you want a program to interfere with the calc's
normal results, and try to guess whether you mean
some RPN operations to try to force algebraic results?

Aren't there very many potentially algebraic-producing
one- and two- argument functions, e.g.
+ - * / ^ % %CHG %T ADD XROOT MIN MOD ABS FP CEIL RE R\->D etc.?
What then if you sometimes want NOT to do this for all of them?

Well, "I'll tell you what I'm gonna do" [famous last words :]

Install the program below and see what it does, then get back to me.

NOTE:

This program is not warranted to be fit or merchantible
for any purpose whatsoever; back up memory first,
and use at your own risk.

Oh, it might be good to first type HOME 256 ATTACH
on the keyboard, before you even attempt
to start typing or transfering this program.

HP49 only:

\<< DEPTH \-> d \<< LASTARG DEPTH d - \->LIST
"{1 " ROT + STR\-> DUP SIZE GET DUP TYPE 18 == {

+ OVER TYPE 9 == { DROP } { NIP \->ALG } IFTE


} { DROP2 } IFTE -55 DUP SF CF \>> \>> '\GbENTER' STO

-55 CF -62 SF -63 SF @ Required flag settings

Toggle USER mode [Left, Alpha] [off]on to [de]activate.

The name '\GbENTER' [starting with Alpha, Right, B]
must be used as shown.

Good luck!

[r->] [OFF]

Paddan

unread,
Dec 2, 2005, 3:32:36 AM12/2/05
to
> The reason is that the built-in compiler automatically simplifies '5'
> to a single number to begin with; it won't generate an algebraic type
> object (type 9) for a single enclosed object, except for the algebraic
> functions which take no args (such as '\pi' 'e' 'i')

Yes I understand that, but I want it to generate an algebraic
expression anyhow...

> That's why you ought to "prime the pump" by creating
> the innermost simplest part yourself, e.g.:

I don't want to....

> Well, "add ' ' around an expression" is thinking like a human,
> writing text on paper, but by now you know that the HP48/49
> doesn't store formulas in memory as text, but as programs
> (RPN programs, in fact), and that the text-like appearance
> you view in the display is a grand illusion,
> the result of a cleverly cloaked conspiracy between a built-in
> compiler (command line input) and decompiler (display),
> but everything internal is still pure RPL!

Yes I know this to, but I don't like the "decompilers" output...

> To simply construct an algebraic by sequentially performing
> RPN operations, no program is needed at all -- once you have
> algebraically expressed the very first operation yourself,
> then the calc takes over from there. Isn't that sufficient?

No it's not! The first step of entering '' 5 + 3 [ENTER] is not RPN and
I use RPN, I don't want any extra steps regardless of internal RPN
mechanisms.

> Aren't there very many potentially algebraic-producing
> one- and two- argument functions, e.g.
> + - * / ^ % %CHG %T ADD XROOT MIN MOD ABS FP CEIL RE R\->D etc.?
> What then if you sometimes want NOT to do this for all of them?

Yes, there are apperantly but I will allways like to have an algebraic
expression displayed just as entered and not in RPN notation like your
program shows it or having the expression evaluated as I enter it. I
Want to enter it using RPN, see it and evaluate it.

/Toad

Brother-Peter

unread,
Dec 2, 2005, 5:27:22 PM12/2/05
to
"Paddan" <pat...@lindefors.com> wrote in message
news:1133512356....@o13g2000cwo.googlegroups.com...
X

> Want to enter it using RPN, see it and evaluate it.

you can't...anything else you want to know?


claptonhendrix

unread,
Dec 2, 2005, 7:18:48 PM12/2/05
to

Paddan ha escrito:

Hi guy: you don't want to use RPN mode, since you have a LIFO stack an
many commands to manage it (last comand, last arg, dup, rot, roll,
etc); you just want to continue using algebraic mode, perfect, but
that's all.

Joe Horn

unread,
Dec 2, 2005, 7:54:02 PM12/2/05
to
Do you know about the ->LST and ->ALG commands? Type 256.02 MENU and
you'll see them as the last two menu items. They convert any algebraic
object into RPN and vice versa, respectively. Instantly, on level 1 of
the stack. No need to bother with the EQW.

-jkh-

John H Meyers

unread,
Dec 2, 2005, 8:19:53 PM12/2/05
to
On Fri, 02 Dec 2005 02:32:36 -0600, Paddan wrote:

> I want to enter it using RPN, see it and evaluate it.

So did you try the program I provided?

I guess not, because if you did, you might be saying
"wow, it does just what I wanted,"
instead of all that long repetition of past postings.

You could, of course, just take the first step yourself,
and let the calc do the rest, but this program
attempts to spare you from even that first step :)

What the program does:

If you have (or enter) 5 and 3 on the stack
and then press +, it discards the true result (8)
and constructs instead '5+3' from the original arguments!

It does this only for true results which aren't already
algebraic objects, of course, since in that case,
there is nothing needed from us but to get out of the way,
and let the calc do its own thing :)

This action is attempted for every function invoked
directly from the keyboard, regardless of how many arguments;
it will be best to leave flag -3 (and why not flag -2 as well)
cleared all the time, because some algebraic objects
require more than just the arguments to be built into
the final construct, so let the calculator take over for itself,
with minimal "getting started" help from this simplistic program.

If you ever get an 'Invalid Expression' result, then just try again
(the HP49 decompiler seems pretty well protected against crashing
from invalid expressions, but we can't guarantee it).

So "Try it, you'll like it" :)

http://www.tvacres.com/chemicals_alkaseltzer.htm
http://www.goforyourlife.vic.gov.au/hav/articles.nsf/pages/Try_it_youll_like_it_Vegetables_and_fruit_for_children
http://www.jrn.columbia.edu/studentwork/cns/2002-04-10/349.asp
http://www.findarticles.com/p/articles/mi_m4021/is_1998_August_1/ai_53179579

[r->] [OFF]

John H Meyers

unread,
Dec 2, 2005, 8:41:07 PM12/2/05
to
On Fri, 02 Dec 2005 02:32:36 -0600, Paddan <pat...@lindefors.com> wrote:

> I don't like the decompiler's output...

Have you tried "Textbook on" [MODE DISP] etc.?
(see flags -79 and -80)

If you explain in detail what display you'd want for
what expression, perhaps someone will write a new decompiler
(and/or equation viewer) to display in your own preferred style :)
[well, it's been done before, e.g. EQSTK for HP48,
which is now sort of built into the HP49]

[r->] [OFF]

Paddan

unread,
Dec 3, 2005, 5:09:17 AM12/3/05
to
> So did you try the program I provided?

Yes I did and thanks for providing them...

> I guess not, because if you did, you might be saying
> "wow, it does just what I wanted,"
> instead of all that long repetition of past postings.

Why do you think your program is such an revelation? At least I'm not
interested in the RPN I just entered being displayed in a list above
the last stack entry....

> If you have (or enter) 5 and 3 on the stack
> and then press +, it discards the true result (8)
> and constructs instead '5+3' from the original arguments!

What the last one does on my calc is 5 [ENTER] 3 + gives {5 3 +} and
'->LASTARG'. Maybe I've missed something or its not working properly.
The other ones just gives me {5 3 +}...

And if anyone is interested in how things can work take a look at the
RPN implementation made for the TI-89, that's how the display should
work! The best from both RPN and algebraic....
http://www.paxm.org/symbulator/download/rpn.html

Maybe I write my own program instead that does what I want, we'll see
if the time permits...


/over and out....

John H Meyers

unread,
Dec 3, 2005, 10:16:54 PM12/3/05
to
On Sat, 03 Dec 2005 04:09:17 -0600, Paddan wrote:

JHM> So did you try the program I provided?

P> Yes I did
P> What the last one does on my calc is 5 [ENTER] 3 +
P> gives {5 3 +} and '->LASTARG'.

It looks as if the most recent program may not have been entered
exactly as posted; please re-display it and look for discrepancies.

Of course, each \-> means the single "arrow" character,
found on the keyboard (above zero) or in the CHARS application.

If downloading a file stored from the actual post,
first set translation mode 3 (e.g. via 3 TRANSIO);
also be sure to have done HOME 256 ATTACH
before even beginning to type or transfer the program.

The last program as posted should produce
nothing extra on the stack; its only purpose
was to give a final result like '5+3' (rather than 8)
when you press + to add 5 and 3, and it works fine for me!

By the way, if named correctly and the required flags are set,
the program runs itself automatically,
whenever a keyboard-initiated function is performed
(do not press its menu key to run it!)

> And if anyone is interested in how things can work
> take a look at the RPN implementation made for the TI-89,
> that's how the display should work!
> The best from both RPN and algebraic....
> http://www.paxm.org/symbulator/download/rpn.html

The "screen shot" suggests that the "RPN" program,
simulating a real stack, is displaying two distinct items
(both a formula and its numeric value)
on each individual "stack level" -- is that so?

In order to build up a formula using RPN, it would
appear necessary that you can "chain" a calculation,
using the last item displayed (E.g. to divide
an already displayed '5+3' by 4)

Does the TI-89 apply your subsequent operations
to the formula(s) on the previous stack level(s),
or does it just use the numeric value(s)?

If the latter, or if it can't even "chain"
such operations using the last result(s),
then it really isn't so smart, after all :)

So here's what we'll offer this time -- something which will
keep two items on each stack level (a formula and a value),
but which will apply any subsequent operations to the formula;
this, to me, looks like a fair simulation of that "RPN" program
but if it isn't, please try to explain in more detail
(perhaps a storyboard) what you really want,
because it probably can be done!

\<< DEPTH \-> d \<< LASTARG DEPTH d - \->LIST

"{1 " ROT + STR\-> DUP SIZE GET IF DUP TYPE 18 == THEN
+ NIP 1 \<< DUP TYPE 5 == { HEAD } IFT \>> DOLIST
DUP LIST\-> DROP EVAL -79 CF -97 SF
DUP TYPE 9 == { NIP } { DROP \->ALG } IFTE
IFERR DUP \->NUM THEN DROP ELSE 2 \->LIST END
ELSE DROP2 END -55 DUP SF CF \>> \>> '\GbENTER' STO

-55 CF -62 SF -63 SF @ Required flag settings

Note that you can always type 0 +
to re-display the current formula along with its value,
without actually modifying the formula at all.

You can always perform HEAD if you want to extract
only the current formula (or 2 GET for the value),
or even \<< LIST\-> DROP \>> 105.2 ASN
to borrow the keyboard ANS function for
splitting the last result into formula and separate value
(undo via 105.2 DELKEYS)

To preserve the current expression on the stack,
just start a new expression or press ENTER.

> Maybe I write my own program instead that does what I want,
> we'll see if the time permits...

Good idea; please post a copy or upload it to www.hpcalc.org,
so we can find out what you really wanted :)

http://www.uoregon.edu/~ftepfer/SchlFacilities/TireSwingTable.html
http://www.monolithic.com/pres/tree_swing/treeswing.jpg

[r->] [OFF]

Greg M.

unread,
Dec 3, 2005, 11:50:19 PM12/3/05
to
John H Meyers wrote:
> On Sat, 03 Dec 2005 04:09:17 -0600, Paddan wrote:
>> And if anyone is interested in how things can work
>> take a look at the RPN implementation made for the TI-89,
>> that's how the display should work!
>> The best from both RPN and algebraic....
>> http://www.paxm.org/symbulator/download/rpn.html
>
> The "screen shot" suggests that the "RPN" program,
> simulating a real stack, is displaying two distinct items
> (both a formula and its numeric value)
> on each individual "stack level" -- is that so?
(Note: I am not Paddan)

Yes. In that screen shot, the stack levels are denoted by 1:, 2:, ...On the
LHS is the "(5+3)/4". On the RHS is the answer, 2.

It displays the algebraic expression which would yield the answer displayed
on the next line down. This is sometimes quite helpful on the 89, because
it often does very fancy simplification without any prompting by the user,
and so being able to double check your input can be a big help. IE,
'sin^2+cos^2' turns to 1 without your doing anything...
OTOH, on the HPs, an EVAL is usually necessary before "big" operations like
that are performed, so I'm not sure if this feature is really worth the
screen real estate.

It does have some issues, the biggest of which is,...
The sequence 2 DUP + DUP + DUP + ... DUP + can only be repeated for a very
short amount of time, as each DUP + doubles the amount of info which needs
to be displayed.


>
> In order to build up a formula using RPN, it would
> appear necessary that you can "chain" a calculation,
> using the last item displayed (E.g. to divide
> an already displayed '5+3' by 4)

Yes. A "4 /" will nicely do that. Lars did a most excellent job, and it
really is as complete an RPN implemenation you could ask for from a 3rd
party. :)


>
> Does the TI-89 apply your subsequent operations
> to the formula(s) on the previous stack level(s),
> or does it just use the numeric value(s)?

No, you can build algebraic expressions with RPN.


>
> If the latter, or if it can't even "chain"
> such operations using the last result(s),
> then it really isn't so smart, after all :)

It is smart. If you have '5+3' on the stack, you can enter 5y /, and the
resultant expression will be '(5+3)/(5*y)' -- the * keystroke was not even
necessary.

> So here's what we'll offer this time -- something which will
> keep two items on each stack level (a formula and a value),
> but which will apply any subsequent operations to the formula;
> this, to me, looks like a fair simulation of that "RPN" program
> but if it isn't, please try to explain in more detail
> (perhaps a storyboard) what you really want,
> because it probably can be done!
>
> \<< DEPTH \-> d \<< LASTARG DEPTH d - \->LIST
> "{1 " ROT + STR\-> DUP SIZE GET IF DUP TYPE 18 == THEN
> + NIP 1 \<< DUP TYPE 5 == { HEAD } IFT \>> DOLIST
> DUP LIST\-> DROP EVAL -79 CF -97 SF
> DUP TYPE 9 == { NIP } { DROP \->ALG } IFTE
> IFERR DUP \->NUM THEN DROP ELSE 2 \->LIST END
> ELSE DROP2 END -55 DUP SF CF \>> \>> '\GbENTER' STO
>
> -55 CF -62 SF -63 SF @ Required flag settings
>

Since I'm interested in trying this out... Do you have a Checksum for me to
compare against to verify I typed it in correctly?

> http://www.uoregon.edu/~ftepfer/SchlFacilities/TireSwingTable.html
> http://www.monolithic.com/pres/tree_swing/treeswing.jpg
http://home.insightbb.com/~gregorym/it.jpeg (I didn't make this, but it's
been sitting on my HD with a nondescriptive name, so I also don't know
where I got it)

Greg

John H Meyers

unread,
Dec 4, 2005, 1:49:27 AM12/4/05
to
On Sat, 03 Dec 2005 22:50:19 -0600, Greg M. wrote:

> I'm interested in trying this out... Do you have a Checksum

Recalling to stack, then doing HEX BYTES,
I get (on my emulated 49G):

If entered in Exact mode: #51F4h 249.5
If entered in Approximate mode: #2304h 265.5

(due to my not bothering with decimal points in the text :)

But since it's all UserRPL, it's not going to do much harm
even if it doesn't match, which mixing reals and integers
might easily cause to happen, so try checking visually :)

Using this program might disable some normal RPL mode operations
(but then so does using ALG mode),
so you may need to turn it off sometimes
(by turning USER mode off).

Good luck!

[r->] [OFF]

Steen Schmidt

unread,
Dec 4, 2005, 5:02:56 AM12/4/05
to
Greg M. wrote:

> It is smart. If you have '5+3' on the stack, you can enter 5y /, and
> the resultant expression will be '(5+3)/(5*y)' -- the * keystroke was
> not even necessary.

I'd say that is wrong. If I do the key sequence 5y/ in RPN mode, I'd
expect the expression '5/y' on stack level one and nothing changed in
the above levels. That's RPN.

Regards
Steen

Paddan

unread,
Dec 4, 2005, 6:31:35 AM12/4/05
to
> It looks as if the most recent program may not have been entered
> exactly as posted; please re-display it and look for discrepancies.

I did a copy paste into (beta)ENTER using edit text in the Connectivity
Kit and apparently that didn't work... I rekeyed the program directly
and now it work. And I must say it's very nice indeed... Thank you!

/Toad

John H Meyers

unread,
Dec 4, 2005, 8:07:58 AM12/4/05
to
On Sun, 04 Dec 2005 04:02:56 -0600:

>> [The "RPN" program for TI calcs] is smart.

That's HP's original parser (in RPN mode),
but I suppose it's perfectly normal
for TI's parser to assume multiplication;
after all, so does HP's *other* parser -- in ALG mode!
(to attract loyal fans of what other brand? :)

Each of the groups accustomed to one of these conventions
will probably find their own comfy and the other a bit strange,
but of course we each know in our hearts that we are right :)

"And we are right, I think you'll say,
To argue in this kind of way;
And I am right,
And you are right,
And all is right -- too-loo-ral-lay!"

W. S. Gilbert
http://math.boisestate.edu/gas/mikado/webopera/mk103.html
http://math.boisestate.edu/gas/mikado/webopera/mk_midi/103.mid

"In your heart you know he's right"
http://www.presidentsusa.net/1964slogan.html
http://en.wikiquote.org/wiki/Barry_Goldwater
http://www.theleftcoaster.com/archives/004491.php
http://thomas.loc.gov/cgi-bin/query/z?r103:E19JY4-93:

[r->] [OFF]

John H Meyers

unread,
Dec 4, 2005, 9:35:39 AM12/4/05
to
On Sun, 04 Dec 2005 05:31:35 -0600:

> a copy paste using edit text in the Connectivity Kit
> apparently didn't work...

In Conn4x: View > Options, is translation mode 3 selected?
(and/or %%HP: T(3); starting off the text)

After adjusting that option,
when I copied program text straight out of the post,
including the '\GbENTER' STO at the end,
saved it in a new PC text file (using Notepad),
and dragged that file to Conn4x,
the '\GbENTER' program got created and stored properly.

Actually, this should not work, but apparently Conn4x
evaluates whatever is transferred, which it ought not,
so then one can take advantage of this bad behavior :)

Otherwise you would have had to evaluate and then discard
the transferred object, using right-click EVAL, right-click Delete.

Glad you finally found one of these programs to your liking :)

[r->] [OFF]

Tom Lake

unread,
Dec 4, 2005, 11:44:14 AM12/4/05
to
>>> [The "RPN" program for TI calcs] is smart.
>>> If you have '5+3' on the stack,
>>> you can enter 5y /, and the resultant expression
>>> will be '(5+3)/(5*y)' -- the * keystroke
>>> was not even necessary.
>
>> I'd say that is wrong.
>> If I do the key sequence 5y/ in RPN mode,
>> I'd expect the expression '5/y' on stack level one
>> and nothing changed in the above levels. That's RPN.

I'd expect to have to do

5 <enter> y /

to get '5/y' on the stack

Tom Lake


Steen Schmidt

unread,
Dec 4, 2005, 3:41:54 PM12/4/05
to
Tom Lake wrote:

> I'd expect to have to do
>
> 5 <enter> y /
>
> to get '5/y' on the stack

Since a variable name can't start with a number (under normal
circumstances), and since / forces command line execution (ENTER), 5
and 'y' will land on seperate stack levels before the division is
performed - hence, the key sequence <5><y></> will result in '5/y' (as
expected) on a HP RPN calc.

The above is one of the cases where you can save even more keystrokes
with RPN (when you learn to spot the unnecessary ENTERs along the entry
way). It becomes second nature after a couple of years.

Regards
Steen

0 new messages