Post Reply 
Request for "Decimal Period of 1/X in Base Y" program
02-27-2015, 04:34 PM (This post was last modified: 02-27-2015 04:38 PM by Gerald H.)
Post: #7
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)

Nice, but the POWMOD is a very heavy calculation for, eg 777 mod 541*10007 takes about 5 sec with your prog.
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-27-2015 04:34 PM



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