The Museum of HP Calculators

HP Forum Archive 18

 Wanted: The % Function to Work Properly on Next 50+gMessage #1 Posted by Eddie W. Shore on 27 June 2008, 3:04 p.m. 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+gMessage #2 Posted by designnut on 27 June 2008, 3:58 p.m.,in response to message #1 by Eddie W. Shore 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+gMessage #3 Posted by Walter B on 27 June 2008, 4:26 p.m.,in response to message #2 by designnut 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+gMessage #4 Posted by Jeff Kearns on 27 June 2008, 4:01 p.m.,in response to message #1 by Eddie W. Shore 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+gMessage #5 Posted by designnut on 27 June 2008, 4:10 p.m.,in response to message #4 by Jeff Kearns 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+gMessage #6 Posted by Jonathan Eisch on 27 June 2008, 9:52 p.m.,in response to message #1 by Eddie W. Shore Aren't most of the graphing calculators also programmable? -Jonathan

 Re: Wanted: The % Function to Work Properly on Next 50+gMessage #7 Posted by Norris on 30 June 2008, 2:26 p.m.,in response to message #1 by Eddie W. Shore 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.

Go back to the main exhibit hall