HP Forums

Full Version: (49G) Infinite Precision Integer to Infinite Precision Hexadecimal String & Back
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The programme takes an integer from the stack & returns a hexadecimal string of the same value.

eg For


otherwise known as


the programme returns

# 0h

Well that's how it's displayed, as internally it's

HXS 00090 00000000000000000000000000000000000000000000000000000000000000000012963E64070DC5​067631DBD7DFC91FF0C596AB955B4B773D6D0FE8343051A0A7DE54C9933E8510

& all the lowest hex values are zero. However if you apply ->H to the result you will see how the number is stored internally, so it is really there.

Given this result as input the programme returns the original integer.

  # FF
    FPTR2 ^DupQIsZero?
    HXS 00001 0
    FPTR2 ^Z>ZH
    # 2A4E
    # 2614
    FPTR2 ^#>Z
    ZINT 16
    FPTR2 ^RMULText
    FPTR2 ^RADDext
Reference URL's