HP Forums

Full Version: User RPL Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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?

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

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.

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.

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.