Post Reply 
Request for "Decimal Period of 1/X in Base Y" program
02-28-2015, 07:30 AM
Post: #8
RE: Request for "Multiplicative Order of Y (mod X)" program
(02-27-2015 04:01 PM)Joe Horn Wrote:  
(02-27-2015 08:49 AM)Thomas Ritschel Wrote:  Here is a simple non-CAS variant:

Thanks, Thomas! Now I gotta turn your program into an exact-integer CAS program.

(02-27-2015 09:57 AM)Gerald H Wrote:  IF you're only interested in integer values for X & Y, this 50G prog does the job: ...

Here's the URPL program I currently use on the 50g:

Code:
<<
WHILE DUP PICK3 GCD DUP 1 >
REPEAT /
END DROP DUP MODSTO EULER DIVIS DUP2 POWMOD 1 POS GET NIP
>>
BYTES: 11.5 #F350h
Input: Y, X (exact mode, of course)
Output: order of Y (mod X)

& thanks for publishing your programme, it made me question the structure of mine. I've now incorporated removing the common factors at the start instead of the crazy return zero. Lord knows why I did that!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Request for "Multiplicative Order of Y (mod X)" program - Gerald H - 02-28-2015 07:30 AM



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