Re: Wanted: The % Function to Work Properly on Next 50+g Message #7 Posted by Norris on 30 June 2008, 2:26 p.m., in response to message #1 by Eddie W. Shore
A TI89 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 TI89, 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 nonprogrammable algebraic, the "%" key will perform either of two different functions, depending on the preceding operation.
For example, my cheap TI30X 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 TI30X 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 TI30X assumes that X + Y% should be Y/100, which is a different function. The TI89 defines the % function in this way only. On a programmable calculator, like the TI89, 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 HP50G, the % key is defined totally differently from the TI89. 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.
