RPL: Binary to "long ints"?



#4

I have to admit that I am slightly confused by the exact/approx modes of machines from the 49G onwards. I also find it slightly frustrating in that porting programs over that use display formatting get messed up by the extra decimal point.

Anyway, here is the question.

With Exact mode set ON, I don't understand why doing this doesn't result in an exact mode integer that preserves all digits:

\<< TICKS B\->R \>>

The only way round this I've found so far is to convert the result from TICKS into a string, edit out the # and base indicator and then use OBJ-\> to get it to the correct integer.

It would be a lot neater and more efficient if this conversion could be done with a single command.

Does anyone know how this would be done please?

Thanks!

Mark


#5

It would help a little to know what you are trying to do, but I don't think there is any way to change a hex value directly into an integer. It has always converted into a real number AFAIK.

As to the rest, use R->I commands in your display program and everything will work fine.

TW


#6

Thanks for the tip Tim! I didn't even know about the R->I command and I was wondering how that conversion was done.

Mark


Possibly Related Threads…
Thread Author Replies Views Last Post
  Writing RPL programs on OS X Sean Freeman 18 5,299 11-30-2013, 03:59 PM
Last Post: Sean Freeman
  48G vs 49G+ User RPL Speed Comparison John Colvin 7 2,679 11-16-2013, 10:07 PM
Last Post: Han
  RPL 32 David Hayden 4 2,105 11-11-2013, 11:34 AM
Last Post: David Hayden
  HP Prime: Long integers (continued) Helge Gabert 2 1,547 11-07-2013, 11:24 AM
Last Post: Helge Gabert
  HP Prime: Pass "Long" Integers to a Program Helge Gabert 6 2,486 11-03-2013, 01:12 PM
Last Post: Helge Gabert
  HP Prime polynomial long division bluesun08 13 3,727 10-30-2013, 03:29 AM
Last Post: parisse
  HHC / HP Museum Programming Contest for RPN and RPL machines Gene Wright 18 5,717 09-22-2013, 09:39 AM
Last Post: Miguel Toro
  Binary versus Decimal prefixes bill platt 22 5,339 04-27-2013, 11:22 AM
Last Post: Walter B
  A very long HP-17BII equation Gerson W. Barbosa 22 5,493 04-19-2013, 12:37 AM
Last Post: Gerson W. Barbosa
  A long WP-34S night Siegfried (Austria) 10 3,174 04-16-2013, 02:11 AM
Last Post: Siegfried (Austria)

Forum Jump: