HP Forums
User RPL Question - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: User RPL Question (/thread-202393.html)



User RPL Question - Paul Berger (Canada) - 10-21-2011

While playing with user RPL I have noticed that on 49G and later calculators my program that contains some nested loops performs much better if I put a decimal point after constants. On the 49G more than 4 times improvement in run time. I searched through the AUR but did not find any mention of what this does. Could someone point me to some information on what the decimal point does?


Re: User RPL Question - Cristian Arezzini - 10-21-2011

The HP49 and 50g have two different kinds of numbers: integers and reals. For example, "5." is a real and "5" is an integer. There are different internal algorithms depending on which one you use, and the difference in execution time can be really large, as you noticed! I had to modify all my old 48G programs, to add the "." after numbers...

Cristian


Re: User RPL Question - Crawl - 10-21-2011

Actually, if you open (for modifying) a program in approximate mode and save it, decimals will AUTOMATICALLY be added after every number.

Personally, I don't like that feature, as there is no (as far as I know) similar feature to remove all the decimals, and there have been times I accidentally added them and then needed to remove them manually.


Re: User RPL Question - Eddie W. Shore - 10-21-2011

Quote:
Actually, if you open (for modifying) a program in approximate mode and save it, decimals will AUTOMATICALLY be added after every number.

Personally, I don't like that feature, as there is no (as far as I know) similar feature to remove all the decimals, and there have been times I accidentally added them and then needed to remove them manually.


I ran into that situation myself - once the program adds automatic decimal points, there is no way back.




Re: User RPL Question - Eddie W. Shore - 10-21-2011

Quote:
The HP49 and 50g have two different kinds of numbers: integers and reals. For example, "5." is a real and "5" is an integer. There are different internal algorithms depending on which one you use, and the difference in execution time can be really large, as you noticed! I had to modify all my old 48G programs, to add the "." after numbers...

Cristian


Would you recommend that programs be entered and ran in Approx mode and if exact numbers/expressions are necessary just take a XQ or -> Q command at the end?

I just noticed that running ->Q switches the calculator from Approximate mode to Exact mode

Edited: 21 Oct 2011, 3:27 p.m.