33S ALG features Overview and Fun



#2


Hello all MoHPC readers,

I have attached some portions of some of my e-mails from yesterday regarding the 33s; you may find this interesting.


Portions were sent to a number of different MoHPC contributors, who will remain anonymous though they may admit to involvement if they so desire!

Where I have added editorial comments to earlier e-mails, they are enclosed in Brackets []


----- Original Message -----
From: William R. Platt
To: r***@***.net
Sent: Tuesday, May 11, 2004 13:10
Subject: HP 33s tricks

Hi *****!

Try this on the 33S:

Do a complex function in ALG Mode. Say, (3 +4 CMPLX) x (4 + 5 CMPLX). Now, you know that the real portion will show up in the display like "Re= -8" and you have to push the down arrow to see the imaginary part: " Im=31"

So this begs the question: how do you get to the imaginary part in a program? (since the down arrow is not a programmable function). You push x<>y! But look what happens when you do this manually: If you push x<>y, you then see "Re=31" and the top line will say "(31 -8i)" If you hit x<>y again, you get back to the "Re=-8"; the top line returns to "(-8 + 31i).

So, this x<>y is how you can use the results of complex number actions in a program. You STO to a variable, X<>Y, STO to another Variable and carry on from there. Note that only the value is stored in the variable---the "Re" part is stripped (this is consistent with the way the 32sii works, too, with say the results of an equation solve).

BTW the X<>y works generally in ALG--you can carry on two independent chain calculations. The LASTx also functions in ALG, but not well--I have not been able to figure out its "logic" in ALG.

[later, I begin to understand it a little bit--when you X<>Y, you clear the lastx register. There is more to be learned about Lastx in ALGmode]

I did not find any of this in the Manual---did you?

If you have a 20s, it is interesting to compare the ALG of the 33s to the 20s. They are not the same, yet both allow you to carry on two chain calculations. In some ways I think I like the 20s implemention better, especially the SWAP key--which is missing from the 33S -- because of its multiline approach. The 20s, though algebraic, allows you that stack-like flexibility of typing in a number, then a function, then a number, then saying, "oops! that one should have been first", hitting SWAP and along you go.In other ways the 33s ALG is much nicer---interesting anyway. [Note that this is the feature that Gene and others, including an anonymous personality, discovered varies from machine to machine...]

BTW have you figured out what the Rdown variables x1 x2 x3 x4 are for in ALG mode, and how you can get to them/use them? It seems like if you solve an equation, you get the result in x1 and x2. But I haven't figured out how to extract them to the stack, or to a storage register.

*****

[A littler later learned from another esteemed but anonymous MoHPC Contributor:] Once the X3 [ or X1 or X2 or X4] is put into a program, there is no longer any manual manipulation. Try this in a program in algebraic:

LBL X

then press RollDown [be sure the machine is in ALG mode] while still in program mode. I see the x1 x2 x3 x4 screen displayed in program mode. Then press right arrow to move over to x3. Now press enter. The second program line is entered as:

x3

Now press RTN [now you see "X3" as a program instruction]

When I XEQ X, the program will perform the "x3" instruction.....[I (Bill) later made a program which used this successfully-----First I solved an equation which left a value in the X3 variable, and then I wrote an ALG program:

LBL X

ALG

X1 (built as described above)

PSE PSE

X3

PSE PSE

X (times)

X2

ENTER

RTN

And it works!]

[Further regarding the X1 X2 X3 X4 business: remember how when in RPN, if you run the solver, the answer is left in X, the last estimate is in Y, and the value of the function at the solution is left in Z? Well, that's exactly what the x1 x2 x3 are doing in ALGebraic---X1 is like X, X2 is y etc. I haven't investigated it yet, but something will go in X4 at some point---maybe with integration--mentioned obliquely in the manual]

****

[Yet even later that day, further correspondence from me to our mystery personality:]

This is interesting! [regarding the difference between X<>Y behavior from one machine to another]

I (Bill Platt) go On-Ln (reset). ALG 27 <divide> 2 <x<>Y> {at this point I see " 27/" top row and "0.0000" bottom row} <enter> "DIVIDE BY 0"

Serial Number CNA41109118 I bought from Amazon Last week. Is your one of the Walmart Pre-release? Or earlier?

Thanks for the x1 x2 x3 x4----great!

Now, the thing about this X<>Y is that I cannot see how one could make a coherent system that worked as yours does [the one which would give .0741 in the above example], considering how the pending operations are handled in this [33s] machine----that top row writing everything down---and then only at enter do you have an answer---what would be "flipped" in X<>Y if you were in the middle of a chain? Try it on yours and tell me what happens.

Another thing you should check: If I keep pressing <enter> after completing an ALG aritmetic, I will get an "action with a constant" effect---like some cheap 4-function machines (or sim to the K on a 10b--a great feature on that machine btw):

27 / 2 ENTER ENTER gives 6.75----in other words <ENTER> rolls the answer up onto the top line, and keeps the last subset to act on. So with parenthesis: 27 X (2+1) ENTER [81] ENTER [243] ENTER [729] etc

Top Line: "27X(2=1)

Bottom Line: 3.0000

now press enter

Top Line "27X(2+1)="

Bottom Line 81.0000

Now enter again:

Top Line "81X3="

B.L 243.0000

Regards,

Bill

***

[Yet later that day...]

[from our distinguished contributor] The X<>Y trick does not work on my 33S in a chain. 1 + 2 / 3 X<>Y ENTER does not give 2.5, but 1.67, as if the X<>Y never happened. However, it does work on 24 divide 12 X<>Y ENTER. Maybe HP fixed it?

The 4-function "constant" functionality is present on my machine.

***
Finally, wrapping up (Bill):


So, the dual chain calculation feature is really quite nice. You can do thus:

ALG CLEAR X<>Y CLEAR . Then do 2 + 2 ENTER X<>Y 5 +5 ENTER + X<>Y ENTER. You will see that the answer is 14----in other words, you did two independent chains, and then "tied them together. If you now go X<>Y again, you see that the "10" is still there ready to be used. This can go on forever---unless you do something that uses both registers--like stats--which BTW is labelled as needing the x<>y.

I hope this e-mail interchange is an enjoyable read---and that it stirs on further experimentation!


Best regards,

Bill

Edited: 13 May 2004, 4:51 p.m.


#3

If I perform a function say 2+2=, then x<>y the 4 is moved out and I will get a zero under the equation. Then perform a second function 3+3=, 6 shows under, if I swap, the 4 from the previous equation swaps with the 6, subsequent x<>y key stokes will swap the 4 and the 6. If I recall lastX it will be 0.

See email below when I ask hp.


Thank you for contacting HP Total Care.

The swap function works in Algebraic mode, but the stack functions do not.

The swap function can be seen by the following:

5 / 3 gives the display:

5 / (divided by sign)
3_

At which time, if I press x<>y it swaps 3 and 5, giving the display:

3 /
5.0000

Pressing x<>y again gives:

5/
3.0000

{This does not work on my calculator}

If I now press ENTER I get the following:

5/3=
1.6667

If I now press x<>y I get the following:

3.0000

which means it swapped the last two data items, the 1.6667 and the 3.

Pressing x<>y again gives:

1.6667

so it is swapping between the last two arguments. That could be useful
when one needs to keep a complex answer and use it with a number of
similar operations.

The stack operations, like R down or up arrow, etc. do not work in
Algebraic mode. That might be by design, but it looks like it isn't
because the R down arrow, for example, appears to be able to choose any
of the four stack elements. Unfortunately, they are all zeros.

I should mention, too, that in RPN mode, the keys =, (, and ) do not
function because they have no use in RPN mode.

The engineers have not responded to us about why the stack operations in
Algebraic mode do not function as we would like them to, so I don't have
an answer to give you.

If you have further questions, please reply to this message and we will
be happy to help you.


Sincerely,
Mike
HP Total Care


#4

I will likely NEVER put my 33s in ALG mode. I didn't pay close to $60 for an algebraic calculator. I can buy those for much less. I will stick with RPN.

#5

Hi "Newbe",

Very interesting. The tech guy ("Mike") knows less about the machine than we do---he should bloody well know that the "stack" x1 x2 x3 x4 in ALG is there for the very specific purpose of allowing review of solve results, integrate results etc. Further, that x1 x2 x3 x4 allows one to program with those elements--as I describe at the top of this thread. (To give the tech some credit---he probably is a generalist--fielding calls for all sorts of hpJunk incl ipaqs and malfunctioning ink jets...). Without the x1 x2 x3 x4, you would never be able to write a custom error-trapping solving program in ALG mode, because you would have no access to the last estimate and the function value.....but with these registers, you do have access equivalent to the stack access in RPN mode.

Now, that earlier example of the 33s which the Tech guy has may be less useful than these newer ones: on the newer ones like you and I have, the swap is allowing two independenent calculator lines. On his, it only swaps the last args in/out of the calculator line. I also think he is mistaken about the complex mode---I think you need the "newer" functionality we have for that to work correctly---see my 1st paragraph of my 1st post at the top of this thread regarding complex results.

Regarding <LASTx> in alg mode:

It is not as simple as you say---try this:

(I use "SWAP" here to mean "X<>Y")

clear it so that swapping gives zeros both x and y
Action X contents Y contents
3.14
SWAP 0 3.14
2 + 2 ENTER 4 3.14
SWAP 3.14 4
3 + 3 ENTER 6 4
SWAP 4 6
LASTx 3.14 6
SWAP 6 3.14
LASTx 4 3.14
SWAP 3.14 4
LASTx 6 4
SWAP 4 6
LASTx 3.14 6
SWAP 6 3.14
and on and on---you can repeat this ad nauseum

The "X" and "Y" here refer to the two independent calculator lines----for lack of better terminology, I use "x" for the lower line that you can see, and "y" for the line that you cannot see (the one that has been swapped into the background).

If you experiment (see my 1st post) you will see that you can pull the results from the "background" chain into the foreground for an operation, thus:
2 + 2 ENTER SWAP 4 + 7 ENTER DIVIDE SWAP ENTER

will give 2.75-----you have done 2+2, realized that you meant to do 4+7 first, so you sWAP over and do that, and then divide 11 by 4......what you cannot do (but can on the "older" 33s) is say "4 / 7 oops I meant 7 / 4" ENTER....

See, unlike earlier models, this one is writing the whole expression to the top line, until an ENTER fianlly finishes it. I believe this is why the newer models were "fixed" to givethe results I get----because the older "swap" paradigm will only work on this newer pending operation method, in the very 1st operation---after that it is bogus...

This is interesting---and it seems consistent.

What we need to know is how in detail the two versions of the 33s behave----I can only test the "newer" version.

Why care? Because unless we understand the nuances of the ALG data handling, we cannot effectively program with it---and that would be too bad---as there are advantages in readability of an "Algebraic" program.

Perhaps this entire thread aught to go to HP.


Best regards,


Bill Platt

http://plattdesign.net

Edited: 14 May 2004, 10:05 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Fun graphs on HP Prime Mic 9 1,227 09-15-2013, 08:30 AM
Last Post: Eddie W. Shore
  Fun things found by running strings on the 39gII emulator bhtooefr 11 1,681 05-16-2013, 12:40 AM
Last Post: Mic
  New features on HP39gII next coming OS Mic 0 417 10-29-2012, 02:10 AM
Last Post: Mic
  Request for HP 30b program to switch to ALG-RPN Sujith Abraham 1 429 09-27-2012, 11:00 AM
Last Post: Bruce Bergman
  Fun with the HP-35 Gerson W. Barbosa 11 1,506 08-02-2012, 10:58 AM
Last Post: Gerson W. Barbosa
  HP-15C User Mode Features Matt Agajanian 5 755 04-30-2012, 11:29 AM
Last Post: Matt Agajanian
  First post here: something fun... Jeff Dinkins 4 739 04-22-2012, 02:42 PM
Last Post: Jeroen Van Nieuwenhove
  Interesting TI Nspire CAS CX programming features Namir 5 825 04-15-2012, 04:11 PM
Last Post: Namir
  Is this right? 33s ALG mode quirk Matt Agajanian 6 853 03-16-2012, 12:45 PM
Last Post: bill platt
  devolution of the wp34s label---or fun with colors troy 19 2,484 02-09-2012, 02:52 PM
Last Post: Egan Ford

Forum Jump: