 (11C) Percent of Total [%T] - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (11C) Percent of Total [%T] (/thread-10532.html) (11C) Percent of Total [%T] - Gamo - 04-18-2018 05:09 AM 10, 11, 15, and 16C doesn't have a [%T] function as 12C Here is a very short program to get the Percent of Total. This example was from the 12C Owner's Handbook start from page 28. Program: Percent of Total Code: ``` LBL A 1/x % 1/x RTN``` Example: Last month, your company posted sales of \$3.92 million in the U.S., \$2.36 million in Europe, and \$1.67 million in the rest of the world. What percentage of the total sales occurred in Europe? 3.92 ENTER > 3.92 // Keys in the first number and separates it from the second 2.36 + > 6.28 // Adds the second number 1.67 + > 7.95 // Adds the third number to get the total 2.36 > 2.36 // Key in 2.36 to find what % it is of the number on display f A > 29.69 // Europe had nearly 30% of the total sales For example, to calculate what percent of the total sales in the preceding example occurred in the U.S. and what percent occurred in the rest of the world: CLx 3.92 f A > 49.31 // The U.S. had about 49% of the total sales CLx 1.67 f A > 21.01 // The rest of the world had about 21% of the total sales. For example, if you already knew in the preceding example that the total sales were \$7.95 million and you wanted to find what percentage of that total occurred in Europe: 7.95 ENTER > 7.95 // Keys in the total amount and separates it from next number 2.36 > 2.36 // Keys in 2.36 to find what percentage it is of the number in the display f A > 29.69 // Europe had nearly 30% of the total sales. Gamo RE: (11C) Percent of Total [%T] - Dieter - 04-18-2018 06:21 PM (04-18-2018 11:14 AM)Mike (Stgt) Wrote:  Thank you for this one, this relation was new to me, it is surprisingly simple, short and useful. This is a useful trick that can also be found in other places. The idea is: if you have a routine that multiplies X by a factor, an 1/x before and after the call turn this into a divison. Suppose you have a routine that calculates x*a. Add an 1/x before and after the call, and you get 1/(1/x*a) = x/a. This comes in handy for unit conversions, and indeed you will find this method already in the respective TI58/59 master library program from 1977. Example for this method: LBL A 2 , 5 4 x RTN This converts inches to centimeters. LBL B 1/x XEQ A 1/x RTN This converts centimeters to inches. The advantage of this method together with "%" (which actually is a simple muliplication with y/100) is that Y is preserved. Dieter RE: (11C) Percent of Total [%T] - Gamo - 05-08-2018 03:42 AM Accumulating Statistics [Σ+] with Percent of Total [%T] Calculate for Total, Percent of Total, and Average. Example: Five groups of a department have submitted the budgets shown below. Determine the department's total budget, each group's percent of the total, and the average budget size. Group #1 Budget 30,168 Group #2 Budget 75,550 Group #3 Budget 52,600 Group #4 Budget 27,800 Group #5 Budget 41,750 Procedure: Assume the program Percent of Total is at [LBL A] Clear Σ // to clear Statistic Registers 30168 [Σ+] > 1 75550 [Σ+] > 2 52600 [Σ+] > 3 27800 [Σ+] > 4 41750 [Σ+] > 5 Total Budget > RCL 3 > 227,868 Each group percent of total #1. 30168 > f A > 13.24% #2. [←] 75550 > f A > 33.16% #3. [←] 52600 > f A > 23.08% #4. [←] 27800 > f A > 12.20% #5. [←] 41750 > f A > 18.32% Average Budget > g [X-bar] > 45,573.60 Gamo