Post Reply 
(48G) 48G, 49G & 50G: Multiplicative Inverse of a Hex String Modulo 2^(Wordsize)
07-20-2015, 10:17 AM (This post was last modified: 06-15-2017 01:50 PM by Gene.)
Post: #1
(48G) 48G, 49G & 50G: Multiplicative Inverse of a Hex String Modulo 2^(Wordsize)
As expected, even inputs return zero.

Code:

::
  CK1&Dispatch
  BINT11
  ::
    HXS 00001 1
    WORDSIZE
    ONE_DO
    OVER
    bit*
    SWAPDUP
    bit*
    SWAPLOOP
    SWAPDROP
  ;
;
Find all posts by this user
Quote this message in a reply
07-22-2015, 05:05 AM
Post: #2
RE: HP 48G, 49G & 50G: Multiplicative Inverse of a Hex String Modulo 2^(Wordsize)
Carmichael

https://en.wikipedia.org/wiki/Carmichael_function

says we can simplify the algorithm to:

Code:

::
  CK1&Dispatch
  BINT11
  ::
    HXS 00001 1
    WORDSIZE
    #1-
    ONE_DO
    OVER
    bit*
    SWAPDUP
    bit*
    SWAPLOOP
    SWAPDROP
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)