Post Reply 
HP35s RPN Series # 4 Constants
02-18-2015, 07:44 AM (This post was last modified: 02-18-2015 07:55 AM by MarkHaysHarris777.)
Post: #1
HP35s RPN Series # 4 Constants
In this example I'm going to take a look at what happens in classic RPN when the stack 'drops'.

When a 'postfix' operation like [X] occurs the value of Reg Y is multiplied into Reg X (the product remains in Reg X) and the stack will then 'drop'; Reg Z copies down into Reg Y, Reg T copies down into Reg Z, and (Reg T remains unchanged??). If the stack 'lifts' what was in T is lost, but if the stack 'drops' what was copied from T into Z also remains in T-! This is a huge surprise to new users of classic RPN, and to new users of the classic HP style calculator (like the HP35s, or the WP34s), but very useful for work with certain constants.

Two examples will help to demonstrate what's going on; the first pedantic, and the second a little more involved, and more fun. In each case we'll consider stack 'lift' and 'drop,' and ENTER as both entry, and replicate. In each case we'll be loading the stack with a constant value which will 'always' remain in our stack as long as our method does not 'lift' the stack more than three times (or more than 7 times in the case of the eight level stack of the WP34s).

Case 1: Pedantic: area of a circle revisited

We may want to calculate areas of circles (lots of them, I don't know why). We're going to multiply the radius squared times PI (over and over). The stack will help us achieve this 'constant' problem. First stack Pies all the way to the ceiling... er, fill the stack with PI:
[gold] [PI] [ENTER] [ENTER] [ENTER]

The thing to note is that PI has been stacked all the way to the top... T. Now, enter some radius [12.5] [ENTER] and notice what happens... the stack has 'lifted,' PI is in Z, and T... and the radius has been 'entered' into X and 'replicated' into Y (this is a good thing). The problem is now easy to finish up with [X] [X]... voila!

The first [X] squared the radius (the stacked dropped, PI is now in Y, Z, and T) and the second [X] multiplies the value PI (Y) by the squared radius (X) to give our area in X (490.87) leaving PI again in Y, Z, and T... ready for our next area... how now? You have two choices:
1) roll the stack down [R↓] and begin again by entering the next [radius] [ENTER] [X] [X] (or)
2) press [←] (which clears X canceling stack 'lift') followed by [radius] [ENTER] [X] [X].

In either case our constant PI remains within the stack proper to be used over and over as a constant multiplier. ~cool, huh?

Case 2: Frequencies in Hz, of Continental concert diatonic equal tempered scales

In the United States (mostly) the frequency of Concert A for the orchestra (based on the oboe) is generally considered as 440 Hz. In many countries in Europe, however, a value of 442 Hz is used, and sometimes 443 Hz. Let's suppose we want to know the frequencies of the Continental diatonic concert E flat scale beginning with E flat below Concert A, assuming Concert A is 442 Hz?

First let's fill the stack with our constant -- the multiplicative value of the geometric progression of the frequencies of the equal tempered chromatic scale 12√2; we'll let the HP35s calculate it for us:
[2] [ENTER] [12] [x√y] [ENTER] [ENTER] [ENTER]

First, we might just want to step through the chromatic frequencies of the Concert A scale; just to see how things work: [442] [X]... [X]... [X]... as many times as you want...

What is happening? Each time the [X] operation occurs Y is multiplied into X and the stack 'drops' copying Z into Y, T into Z, leaving T unchanged (our constant, loyal and ready).

Now something more interesting... the diatonic E flat scale beginning E flat below Concert A:
First clear X with [←] which also cancels stack 'lift'. Input [6] (which is the relative semitone number below Concert A for E flat) and then press [y^x] (which sets our progression to skip 6 semitones). Our constant is still in the stack, the stack has dropped once.

Now input our Concert A frequency [442] (the stack has 'lifted') followed by [x<>y] [/] (the stack has dropped, the frequency of E flat is now in Reg X (312.54), and our constant 12√2 is in Y, Z, and T). All that remains is to step through the scale frequencies Do Re Me Fa So La Ti Do, remembering that there are two semitones between all notes except between Me-Fa and Ti-Do in which case there is only one semitone... our constant and the stack will do most of the work:
Do 312.5412 Hz [X] [X]
Re 350.8156 Hz [X] [X]
Me 393.7772 Hz [X]
Fa 417.1924 Hz [X] [X]
So 468.2827 Hz [X] [X]
La 525.6295 Hz [X] [X]
Ti 589.9992 Hz [X]
Do 625.0824 Hz

Voila! ~cool, huh?

What to run it again...? just input [2] [/] and you're one octave 'down' back at your starting frequency of 312.5412 E flat (based on Concert A is 442 Hz) At any time we might pick a different offset from Concert A [←] [3] (for high C) then power [y^x] [442] [X] (frequency of high C, in Hz) and then step through the notes as before... all because our constant value for this geometric progression 12√2 is replicated down from T during stack 'drop'.


Kind regards,
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
HP35s RPN Series # 4 Constants - MarkHaysHarris777 - 02-18-2015 07:44 AM

User(s) browsing this thread: 1 Guest(s)