percent of total in rpn mode



#32

I have a 33s, and I cannot figure out how to find a percent of a total in RPN mode by using the % key.

i.e., 30 is 'what percent' of 50.

The best I can come up with is

30 enter 50 / 100 x

in ALG I can do

30 / 50% enter

isn't there a way to use the % key in RPN mode?

TIA,

tropicflite


#33

AFAIK this key is for another purpose, e.g.

50 ENTER 30 %

will display 15 in x while the base (50) stays in y, as it is done in earlier models. Never heard of the way you look for in RPN so far, but that doesn't mean it doesn't exist...

BTW, if you remember "%" abbreviates "per 100" you can save 1 keystroke to solve your problem in RPN, using

30 ENTER 50 E +/- 2 /

exactly equivalent to the expression you used in ALG.

HTH

Walter


Edited: 16 May 2007, 2:39 a.m.


#34

Your key sequence

30 ENTER 50 E +/- 2 /

is indeed one keystroke shorter than my version

30 ENTER 50 / 100 x

though I'm not sure it's an improvement over the the ALG

30 / 50% ENTER

BTW, I also tried making the equation

A / B x 100

and doing

30 R/S 50 R/S

This works well if you have a lot of percentages to compute, but it involves first writing the equation and then finding it in the list.

On my one-dollar LeWORLD 4-banger from Walmart, I can do

30 / 50%

which shaves a keystroke off the 33S's ALG version, and other HP's, (namely the 12C Platinum) have a %T key which allows

50 ENTER 30 %T

which is equally good, (though, thinking about it, wouldn't that key be better labeled as %Y ? But I digress..)

In the end, I think this a rare case where the ALG version is better, at least on the 33s.

Regards,

tropicflite


#35

"%" is a fifth bang. I'll bet it has a square root, too. (Another case of bang inflation.)

I wonder, are there any REAL four-bangers out there?


#36

You, sir, are absolutely correct. It has the standard four 'bangs', percent, square root, as well as MRC, M-, and M+. I happen to have the lovely green model.

Now this strictly meets the definition. Sadly, I don't have one.


#37

I believe Commodore had a couple of early, truly four-function models. (I believe I've got one buried in a box somewhere.)

I doubt there are any made these days.

The fact that yours is available for only one dollar (and the Scientific is like ~$4, right?) is pretty amazing -- especially given the value of a dollar these days. Times do change!

Edited: 16 May 2007, 4:48 p.m.


#38

Couldn't be more basic -- but with an interesting interface to compensate for the fact that the four operations are not mapped to any of the keys.

You key in a number, scroll to the desired operation, key in another number, and press "EQUALS" (assigned to the menu selection key).

#39

Hi;

the shortest expression for %T (percent of total) would be:

                a
%T(b,a) = 100 × -
b
being b the total and a the part. If you want to use the percent key, you should see the expression for percent, that is::
         a × b
%(b,a) = -----
100
I cannot see an easy way to compute %T by using the % key, though.

Hope this clears the subject up... a bit.

Cheers.

Luiz (Brazil)


#40

Nice work Luis. What about [1/x] [%] [1/x] for a [%T] ? :-)


#41

Hi, Tony;

Quote:
Nice work Luis. What about [1/x] [%] [1/x] for a [%T] ? :-)
What to say? Yours is the very nice work. Unbeatable!

Thanks for your ingenious suggestion (solution, indeed...)

Best regards.

Luiz (Brazil)

Edited: 17 May 2007, 10:06 a.m.

#42

Quote:
What about [1/x] [%] [1/x] for a [%T] ?

Nice!

Works perfectly, and is perfectly compatible with RPN.

To be explicit:

50 ENTER 30 [1/x] % [1/x] --- returns 60

Beautiful!

Edited: 17 May 2007, 2:49 p.m.

#43

Here's the sequence, using only 4 keystrokes:

3
ENTER
5
/

First, do a mental 30/50 = 3/5 calc. Also, you don't really need to multiply by 100, if you acknowledge that you are seeing the percent in decimal form. :)

ECL

#44

50
ENTER
30
%CH

-40.00

therefor 30=60% of 50


#45

Quote:
50 ENTER 30 %CH

-40.00

therefor 30=60% of 50


This is a step in the right direction, but it still needs

100 +

to get to the correct answer.

So, 30 ENTER 50 %CH 100 +

gets us there, but not any more efficiently than

30 ENTER 50 / 100 x

#46

On an RPN calculator, it's impossible to implement a single % function that duplicates the % key on an algebraic calculator.

On an algebraic calculator, there are actually two different % functions, and the calculator chooses one or the other based on the preceding operation. For example, compare the following using an algebraic calculator, or on the 33S in ALG mode:

200 + 30%

200 - 30%

200 * 30%

200 / 30%

In the first two cases, an algebraic calculator generates the number "60" when you press the % key. In the next two cases, an algebraic calculator generates the number "0.30" when you press the % key. So the % function is defined differently, depending on whether the preceding operation is addition/subtraction or multiplication/division.

On an RPN calculator, no such ambiguity is possible. The % function will be followed, not preceded, by addition/subtraction or multiplication/division. The RPN calculator, while powerful, is not psychic, and does not know what operation will come next. So the % function can only be defined in one way. The 33S in RPN mode assumes that you are doing addition/subtraction with %. If you want to do multiplication/division with %, then you are out of luck (or you simply program an alternative function).

Note that the ambiguous % function can also cause issues on algebraic calculators. For example, algebraics (including the 33S in ALG mode) typically return different answers for the following equations:

200 + 30% = 260

30% + 200 = 200.30


Edited: 17 May 2007, 12:31 a.m. after one or more responses were posted


#47

If you want to add a % function for use with multiplication/division to the 33S, just program it in as follows:

[left-shift] PRGM

[left-shift] LBL I

100

/

[right-shift] RTN

[left-shift] PRGM

Now simply use XEQ %, instead of %, when you use % with multiplication and division operations. Example: 30 ENTER 50 XEQ % / yields 60. Continue to use the existing % function when you use % with addition and subtraction.


Edited: 16 May 2007, 7:18 p.m.


#48

First, thanks for you efforts. Your program works a treat, and now lives in my 33S. That said, I was curious about the results of the 2 different % functions you mentioned, so I tried it on 3 different calculators, which yielded some interesting (and varying) results.

Calculator 1: LeWorld one-dollar six-banger

200 + 30 % --- returns 260

200 - 30 % --- returns 140

200 * 30 % --- returns 60

200 / 30 % --- returns 666.66666

Calculator 2: TI-30X IIS (2-line ALG scientific calc)

200 + 30 % --- returns 200.3

200 - 30 % --- returns 199.7

200 * 30 % --- returns 60

200 / 30 % --- returns 666.66666

Calculator 3: HP-33S (in ALG mode, results exactly as you stated)

200 + 30 % --- returns 60

200 - 30 % --- returns 60

200 * 30 % --- returns .30

200 / 30 % --- returns .30

Edited: 16 May 2007, 10:55 p.m.


#49

Quote:
Calculator 3: HP-33S (in ALG mode, results exactly as you stated)

200 + 30 % --- returns 60

200 - 30 % --- returns 60

200 * 30 % --- returns .30

200 / 30 % --- returns .30


Hi tropicflite. I believe that you need to press Enter after pressing the % key in order to complete the operation.

Regards,

John


#50

As stated above, if you add "ENTER" to the 33S operations, you will get the final results of the percentage calculations (which should be 260, 140, 60, 666.67). I omitted this step, because I wanted to emphasize the differences in the intermediate result obtained from the % function alone.

As you have probably figured out, for an equation like:

X + Y% =

then Y% is defined as XY/100

but for an equation like:

X / Y% =

then Y% is defined as Y/100 (which is different)

The algebraic calculator "knows" which Y% you want, because it "sees" the preceding operator (unless you feed it an equation without a preceding operator, like 30% + 200, in which case it may err). The RPN calculator doesn't "see" the preceding operator, and thefore can't make that determination.


Edited: 17 May 2007, 12:15 a.m.


#51

I have to say that I was surprised by the results that you got from the TI-30 IIS. The "200 + 30% = 200.30" is probably not the result that most people would expect. Like the 33S in RPN mode, the TI-30 IIS apparently uses only one of the two %-formulas (but the 33S/RPN uses the XY/100, while the TI-30 IIS apparently uses Y/100 instead).

I found a TI-30 IIS here in the office and tried it, and got the same result that you did. My old TI-30X Solar, on the other hand, returns the expected result of 260 for this calculation.


#52

Truly "unexpected" is the result on a Casio fx-115MS:
200 + 30% = 766.66667

30% + 200 = 230

This is why I've never trusted that key on anything but a 12c.

#53

I would expect that the most common use of the % key is to calculate costs, given discounts or surcharges. For example, what is the total cost of a $19.95 item if it is 25% off, and if there is 8% sales tax?

You can readily solve this problem with the % key on most cheapo algebraic calculators (19.95 - 25% + 8% = 16.16). Or you could use an HP RPN calculator, because its % function is designed to work with addition and subtraction.

But you can't solve this problem with some high-end TI calculators, including the "top-of-the-line" TI-89. On the TI-89, 19.95 - 25% + 8% ENTER yields 19.78. The % function is designed for use with multiplication/division, not addition/subtraction.

The "top-of-the-line" HPs, like the 48G series or 50G, have both the % and %T functions.

#54

The % function on some Casios apparently can't be used with addition/subtraction either. On a Casio fx-260 Solar:

200 + 30% yields 766.66667 (as noted above for the Casio fx-115MS)

200 - 30% yields 566.66667

19.95 - 25% + 8% yields -20.2 (after subtracting 25%) and then -152.5 (after adding 8%). I have no clue how it gets these results.

I looked in the Casio manual for this model. It only provides examples for using % with multiplication/division. There is no warning about using % with adddition/subtraction.

Edited: 17 May 2007, 1:46 p.m.


#55

Hi Norris,

Check out the Casio FX-260 training guide (PDF):

Training Guide

It has the following example of how to add a percentage:

Quote:
To add a percentage
15% to 1000 (or 1000 increased by 15%)

[1000] [x] [15] [SHIFT] [%] [+]

Result = 1150


There's some other Percentage operations included in the guide.

Bill

Edited: 17 May 2007, 2:59 p.m.


#56

OK, that procedure, while clumsy and unintuitive, does work on my fx-260, for both adding and subtracting percentages. For example:

[19.95] [x] [25] [%] [-] [x] [8] [%] [+] yields 16.16

But this procedure is not documented in the User's Manual that comes with the calculator. I don't think there was any "Training Guide" included.

Apparently the 260 only implements one form of the % function, designed for use with multiplication/division. So to add or subtract %, you have to append the addition or subtraction operator at the end of the equation, after you've calculated the percentage. It's almost like RPN ! (except, of course, for the preceding multiplication operations)


Edited: 17 May 2007, 5:37 p.m. after one or more responses were posted


#57

Hi Norris,

Quote:
But this procedure is not documented in the User's Manual that comes with the calculator.

Is the User's manual you posted a link to the same that came with the calculator? If so, then check Example 3, at bottom of page 10 and Example 4 at top of Page 11:

EXAMPLE 3: To add 15% onto 2500

[2500] [X] [15] [SHIFT] [%] [+] yields 2875

The Training Guide I found by doing Google Search. I don't have any Casio's, but the Casioeducation site looks interesting. But I think it may need a login to get to the training guide through the normal way on their web site.

Bill

Edited: 17 May 2007, 3:23 p.m.


#58

Yup, you're right, I missed it.

#59

All of the foregoing just underscores the point that the % "function" is a marketing gimmick, with varying implementations and interpretations.

In the interest of learning "real" math, far better to understand what "percent" means, and to become accustomed to (for example) multiply by 1.3 rather than "<n> + 30 %".


#60

You're right. For example, I never really appreciated the variability in the % function before this tread started, because I never use this key myself.

#61

Quote:
I have a 33s, and I cannot figure out how to find a percent of a total in RPN mode by using the % key.

i.e., 30 is 'what percent' of 50.

The best I can come up with is

30 enter 50 / 100 x


That indeed is the best way to perform the calculation. But really, the mathematically-inclined user is expected to be able to mentally shift the decimal point two places to the right. That's probably why no built-in function was provided on RPN scientific models.

However, the financial models (e.g., HP-12C, HP-10B, HP-14B, and HP-17B), whether RPN or algebraic, usually include a "%T" (percent of total) function. This function is implemented where possible in a menu, which makes RPN or algebraic mode irrelevant.

-- KS


#62

Quote:
the mathematically-inclined user is expected to be able to mentally shift the decimal point two places to the right. That's probably why no built-in function was provided on RPN scientific models.

However, the financial models ... include a "%T" (percent of total) function.


Always knew there is a difference between science and business :-))


Possibly Related Threads...
Thread Author Replies Views Last Post
  Integration question and "RPN" mode comment Craig Thomas 16 3,274 12-05-2013, 02:32 AM
Last Post: Nick_S
  HP Prime: Recommendation for future RPN Program Mode BruceTTT 3 1,031 11-13-2013, 10:03 PM
Last Post: BruceTTT
  [PRIME] RPN: another attempt at returning more than one value to the RPN stack Marcus von Cube, Germany 5 1,408 11-05-2013, 02:44 AM
Last Post: Marcus von Cube, Germany
  Program to change entry mode on Prime Michael de Estrada 3 995 10-28-2013, 10:13 AM
Last Post: Han
  Prime: Exam mode (possible duplicate after funny response first time) Paul Townsend (UK) 1 803 10-24-2013, 03:09 PM
Last Post: Tim Wessman
  Does RPN entry mode cause the Prime keyboard to lock up ? Michael de Estrada 14 2,587 10-22-2013, 06:27 PM
Last Post: John Colvin
  HP Prime: Edit integer in RPN mode plivesey 15 2,585 10-18-2013, 04:34 PM
Last Post: kris223
  Temporary User Mode Key Programs not working in RPN BruceTTT 7 1,527 10-14-2013, 01:46 PM
Last Post: BruceTTT
  HP Prime: MAKELIST in RPN mode? toml_12953 2 869 10-13-2013, 07:40 PM
Last Post: BruceH
  Low battery slow mode Marcel Samek 4 940 09-18-2013, 02:02 PM
Last Post: Harald

Forum Jump: