HP Forums
Wanted: The % Function to Work Properly on Next 50+g - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Wanted: The % Function to Work Properly on Next 50+g (/thread-138456.html)



Wanted: The % Function to Work Properly on Next 50+g - Eddie W. Shore - 06-27-2008

On graphing calculators, the % operator only divides the number by 100. So instead of $7.99 + 8.25% = $8.64, I get 8.0725.

Can we have the % operator work correctly on the next model please HP?


Re: Wanted: The % Function to Work Properly on Next 50+g - designnut - 06-27-2008

It's a bit of a bother but in RPN I key 7.99 enter enter 8.25 then LS MTH 5 real, then OK then OK and it takes the percent, then + to add. works fine for me. Sam


Re: Wanted: The % Function to Work Properly on Next 50+g - Jeff Kearns - 06-27-2008

Quote:
On graphing calculators, the % operator only divides the number by 100. So instead of $7.99 + 8.25% = $8.64, I get 8.0725.

Can we have the % operator work correctly on the next model please HP?


I do not at all understand your problem, Eddie. On the HP 48G and the HP 50, I get the correct answer by entering 7.99 on levels 1 and 2. Then entering 8.25 followed by % and then +. Ans: $8.65.

Just how does one go about getting a wrong answer on one of these units?

Jeff


Re: Wanted: The % Function to Work Properly on Next 50+g - designnut - 06-27-2008

On other HP calcs the % function does not "eat" y, but leaves it untouched, so the extra enter is needed on the 50g. Sam


Re: Wanted: The % Function to Work Properly on Next 50+g - Walter B - 06-27-2008

Quote:
It's a bit of a bother but in RPN I key 7.99 enter enter 8.25 then LS MTH 5 real, then OK then OK and it takes the percent, then + to add.

7.99 ENTER 8.25 g% + (on a 35s, for example)

What strange RPN calc did you use, Sam?

Even on a 48G, it's 7.99 ENTER ENTER 8.25 MTH REAL % + (so 2 extra keystrokes, being the just penalty for using such a big RPL cannon).


Edited: 28 June 2008, 8:12 a.m.


Re: Wanted: The % Function to Work Properly on Next 50+g - Jonathan Eisch - 06-27-2008

Aren't most of the graphing calculators also programmable?

-Jonathan


Re: Wanted: The % Function to Work Properly on Next 50+g - Norris - 06-30-2008

A TI-89 graphing calculator displays the behavior described by the Original Poster. If you enter "$7.99 + 8.25%" and evaluate it, you get 8.0725. On a TI-89, the % function is defined as taking one argument, which it divides by 100.

There is no "proper" definition of the % function; it is implemented differently on different calculators. In fact, the % function is commonly defined in two different ways on the *same* calculator. On a conventional non-programmable algebraic, the "%" key will perform either of two different functions, depending on the preceding operation.

For example, my cheap TI-30X Solar generates the following results:

For 7.99 + 8.25%, you get 0.6592 when you hit the % key

For 7.99 * 8.25%, you get 0.0825 when you hit the % key

For addition (and subtraction), the TI-30X assumes that X + Y% should be XY/100. This is the way that the Original Poster apparently wants the % key to work.

For multiplication (and division), the TI-30X assumes that X + Y% should be Y/100, which is a different function. The TI-89 defines the % function in this way only. On a programmable calculator, like the TI-89, you have to pick one or the other definition for %. You can't have it both ways, because it could lead to unpredictable results in programs.

On an HP-50G, the % key is defined totally differently from the TI-89. A 50G takes two arguments (not one), and calculates XY/100 (not Y/100). So %(7.99,8.25) is 0.66, which is the result that the Original Poster apparently expects. But in this case, the % function "eats" the 7.99 value, so you would have to use an extra ENTER to store it first.

On any graphing calculator, if you don't like the way that % is implemented, then it is trivial to write a simple program to replace it.

Edited: 30 June 2008, 6:48 p.m.