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?
User RPL Question
|
|
« Next Oldest | Next Newest »
|
▼ ▼
Post: #6
10-21-2011, 09:47 AM
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 ▼
Post: #7
10-21-2011, 10:05 AM
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. ▼
Post: #8
10-21-2011, 03:23 PM
Quote: I ran into that situation myself - once the program adds automatic decimal points, there is no way back.
Post: #9
10-21-2011, 03:26 PM
Quote: 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. |