HP Forums
Is there a way to use %TOTAL or similar in RPN? (Solved) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Is there a way to use %TOTAL or similar in RPN? (Solved) (/thread-12944.html)



Is there a way to use %TOTAL or similar in RPN? (Solved) - Jlouis - 05-09-2019 02:39 PM

As the title says.

I was in need to make several %TOTAL but could not do it in the Prime, so I quick grabed a 39GII and could do the job very easy. Later on I discoverd that in the catolog we can use %TOTAL , but only in textbook.

I searched the manual and this forum and find nothing.

Thanks in advance

Cheers

JL


RE: Is there a way to use %TOTAL or similar in RPN? - toml_12953 - 05-09-2019 03:14 PM

(05-09-2019 02:39 PM)Jlouis Wrote:  As the title says.

I was in need to make several %TOTAL but could not do it in the Prime, so I quick grabed a 39GII and could do the job very easy. Later on I discoverd that in the catolog we can use %TOTAL , but only in textbook.

I searched the manual and this forum and find nothing.

Thanks in advance

Cheers

JL
It works the same way all functions work in RPN. You put the arguments on the stack then use the number of arguments as the argument to the function:

instead of %TOTAL(20,50) do this:

20
Enter
50
Enter
%TOTAL(2)

and you'll get 250 which is the right answer. You use 2 in the parentheses since there are two arguments needed by %TOTAL.


RE: Is there a way to use %TOTAL or similar in RPN? - Jlouis - 05-09-2019 04:02 PM

(05-09-2019 03:14 PM)toml_12953 Wrote:  
(05-09-2019 02:39 PM)Jlouis Wrote:  As the title says.

I was in need to make several %TOTAL but could not do it in the Prime, so I quick grabed a 39GII and could do the job very easy. Later on I discoverd that in the catolog we can use %TOTAL , but only in textbook.

I searched the manual and this forum and find nothing.

Thanks in advance

Cheers

JL
It works the same way all functions work in RPN. You put the arguments on the stack then use the number of arguments as the argument to the function:

instead of %TOTAL(20,50) do this:

20
Enter
50
Enter
%TOTAL(2)

and you'll get 250 which is the right answer. You use 2 in the parentheses since there are two arguments needed by %TOTAL.

VoilÄ!

Really thanks! I searched the manual and didn't find this!

Cheers!


RE: Is there a way to use %TOTAL or similar in RPN? - Wes Loewer - 05-09-2019 07:10 PM

or just use

20
Enter
50
Enter
%TOTAL or %TOTAL()

like any other function that by default takes two parameters.


RE: Is there a way to use %TOTAL or similar in RPN? - Dirk.nl - 05-09-2019 08:19 PM

The Finance App has a very good percentage tool


RE: Is there a way to use %TOTAL or similar in RPN? - toml_12953 - 05-09-2019 09:20 PM

(05-09-2019 07:10 PM)Wes Loewer Wrote:  or just use

20
Enter
50
Enter
%TOTAL or %TOTAL()

like any other function that by default takes two parameters.

Yeah, but I wear a belt and suspenders! Overkill is my business Big Grin


RE: Is there a way to use %TOTAL or similar in RPN? - Jlouis - 05-09-2019 11:31 PM

(05-09-2019 08:19 PM)Dirk.nl Wrote:  The Finance App has a very good percentage tool

Thanks Dirk, I didn't know that, really practical and usefull.

I'm still discovering the Prime, after waiting for buying the G2 living in Brazil is a bit frustating, I decided to buy the G1 and I'm having fun with it.

Cheers