User RPL Question
#1

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?

#2

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

#3

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.

#4

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.

#5

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.



Possibly Related Threads…
Thread Author Replies Views Last Post
  Writing RPL programs on OS X Sean Freeman 18 5,037 11-30-2013, 03:59 PM
Last Post: Sean Freeman
  48G vs 49G+ User RPL Speed Comparison John Colvin 7 2,536 11-16-2013, 10:07 PM
Last Post: Han
  RPL 32 David Hayden 4 2,027 11-11-2013, 11:34 AM
Last Post: David Hayden
  HHC / HP Museum Programming Contest for RPN and RPL machines Gene Wright 18 5,449 09-22-2013, 09:39 AM
Last Post: Miguel Toro
  RPL long vs. short names peacecalc 5 1,983 10-30-2012, 01:25 PM
Last Post: peacecalc
  Mini-challenge: HHC2012 RPL programming contest with larger input David Hayden 14 3,536 10-05-2012, 10:36 PM
Last Post: David Hayden
  HHC 2012 RPL Programming Contest Gene Wright 33 7,514 09-27-2012, 01:57 AM
Last Post: Werner
  HHC 2012 programming contests coming soon (RPN and RPL) Gene Wright 9 2,620 09-21-2012, 03:38 PM
Last Post: Paul Dale
  RPL prog for Fibonacci on HP 48G needs minor modification. help. wildpig 68 15,989 07-09-2012, 09:38 AM
Last Post: Gilles Carpentier
  RPL/2 under HP-UX Martin Paech 2 1,059 04-21-2012, 07:36 AM
Last Post: David Hayden

Forum Jump: