HP Forums

Full Version: (48G) 48G, 49G & 50G: Multiplicative Inverse of a Bint Modulo 2^20
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The title says it.

If you have a faster algorithm please say.

Code:

::
  CK1&Dispatch
  # 1F
  ::
    BINT1
    BINT19
    ZERO_DO
    OVER
    #*
    SWAPDUP
    #*
    SWAPLOOP
    SWAPDROP
  ;
;
Carmichael

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

says we can simplify the algorithm to:

Code:

::
  CK1&Dispatch
  # 1F
  ::
    BINT1
    BINT18
    ZERO_DO
    OVER
    #*
    SWAPDUP
    #*
    SWAPLOOP
    SWAPDROP
  ;
;
Reference URL's