
×InformationLearn how to upgrade to Windows 11

×InformationLearn how to upgrade to Windows 11
 HP Community
 >
 Other Products
 >
 Calculators
 >
 Is there any way how to measure program execution time in HP...
 Mark Topic as New
 Mark Topic as Read
 Float this Topic for Current User
 Bookmark
 Subscribe
 Mute
 Printer Friendly Page
Create an account on the HP Community to personalize your profile and ask a question
Solved!
Is there any way how to measure program execution time in HP 50g graphing calculator ?
02262019 03:14 PM
Hello dear HP community ,
I wanna know how to measure program execution time , if you did not understand from tittle , I want to know how to measure program execution time when i run some program written in HP 50g graphing calculator !!
If is possible to measure what time does it take to measure how fast program "works" from beginning to the end of program .
And also , if you knew that , I wanted to know if is possible to do SPEED MEASUREMENTS with programs written in User RPL ?
Thanks a lot !!
Solved! Go to Solution.
Accepted Solutions
02262019 09:58 PM
Yes: Use the TEVAL command. Its name means "Timed EVAL" (I think). It EVALs the object on level 1, returns its results to the stack as usual, then also pushes the number of seconds which elapsed during that execution, tagged with an "s" to remind you that it's a number of seconds.
Examples:
<< 1 WAIT >>
TEVAL >
1: s:1.01 (results will differ slightly)
<< 1000 ! >>
TEVAL >
2: 40238726007709377....... (the value of 1000 factorial)
1: s:28.8 (results will differ slightly)
'MYPROG'
TEVAL > the output(s) of MYPROG, and the number of seconds it took to run.
Disclaimer: I don't work for HP, but HP works for me.
02262019 09:58 PM
Yes: Use the TEVAL command. Its name means "Timed EVAL" (I think). It EVALs the object on level 1, returns its results to the stack as usual, then also pushes the number of seconds which elapsed during that execution, tagged with an "s" to remind you that it's a number of seconds.
Examples:
<< 1 WAIT >>
TEVAL >
1: s:1.01 (results will differ slightly)
<< 1000 ! >>
TEVAL >
2: 40238726007709377....... (the value of 1000 factorial)
1: s:28.8 (results will differ slightly)
'MYPROG'
TEVAL > the output(s) of MYPROG, and the number of seconds it took to run.
Disclaimer: I don't work for HP, but HP works for me.
02272019 03:46 AM
Hi Joe ,
Thanks a lot for a reply to my message !!
But i mean that you make a mistake , or not ... I'm not sure because I solve this task 1000! and I get different numbers from yours . I mean you got 40238726007709377... for solving factorial of 1000 , and I get some sort of infinite numbers .
I did not mentioned that I solve this task in HP 50g emulator , not physically in real HP 50g graphing calculator , so maybe is my result slight different because i used emulator instead of real HP 50g graphing calculator !!
Look at the pictures ...
I used your function << 1000 ! >> TEVAL ...
When i hit ENTER , i get this result which is written down below inside picture , look at the picture
Like I said , I really don't know if is result slight different because i used a HP emulator because I don't have HP 50g graphing calculator with me ( physically ) , but that does not matters right now because you helped me with solving task that I request
Thank you very much Joe Horn
You always give me a good advices and answers
I'll accept your solution definitely !!!
Have a nice day ,
Josip Kova
02272019 05:37 AM  edited 02272019 05:44 AM
Hi!, @JKova :
The result of 1000! is +infinite in Approximate Mode and the HP50G calculator delay ...
But, if you comparison with Wlofram Alpha, is ...
Have a nice day !.
@Maké (Technical Advisor Premium  HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
02272019 06:02 AM
@JKova wrote:I'm not sure because I solve this task 1000! and I get different numbers from yours . I mean you got 40238726007709377... for solving factorial of 1000 , and I get some sort of infinite numbers .
Try again with your 59g in EXACT MODE. (Press MODE, CAS, and uncheck Approx). In exact mode, you can input and output "long integers" (also sometimes called "infinite precision integers" although that's obviously an exaggeration). Long integers can even be used in algebraic expressions, thus allowing exact fractions and exact coefficients. When you want to return to the normal HP world of real numbers limited to 12digit mantissas, then turn on approximate mode.
02282019 09:47 AM
Dear Joe ,
Yeah i did not realize that you use Wolfram Alpha to calculate such amount of numbers . sorry about that !!
Once again , I apologize to you !!
I almost forget it to tell you that I'm so gratefull to you for your explanation how to use exact mode . I did not tried with exact mode to solve any of tasks but I will in the future , maybe
Thank you !!
Best regards ,
Josip Kova
02282019 11:07 AM  edited 02282019 11:20 AM
Hi!, Josip Kova :
I was the one who wrote to you the comparise with Wolfram Alpha, not Joseph Horn.
With HP50G in CAS for Approx. or Exact Mode for infinite is same and only present, in LCD Display ... 9.99999999999E499
Have a nice day !.
@Maké (Technical Advisor Premium  HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
02282019 02:19 PM
Dear @Maké ,
It seems that I did not read when I was typing I'm really , really sorry about that @Maké ... unacceptable I know
But thank you anyway for your advices , about that number that you get from Wolfram Alpha and others too !!
Sorry man , I don't know what else to say , now I know too much ( about my request that I asked this community ) !!
Thank you very much !!
Best regards ,
Josip Kova

EnglishOpen Menu
Didn't find what you were looking for? Ask the community