View Single Post
Old 2019-06-19, 01:15   #2
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3×1,327 Posts
Default

Quote:
Originally Posted by tServo View Post
Can someone please explain how this Mod is computed?
TIA

Code:
(20:02) gp > (Mod(2633043,8388607)/9)
%1 = Mod(5884965, 8388607)
(20:02) gp > lift(%1)
%2 = 5884965]
It computes 2633043 mod 8388607

Then 2633043/9 mod 8388607

Then "lifts" it to an integer.

It does the division by some kind of extended euclidian algorithm. Note that gcd(8388607,9)==1 must be so.

9 * 5884965 == 2633043 mod 8388607

That is 8388607 divides 9 * 5884965 - 2633043

Last fiddled with by paulunderwood on 2019-06-19 at 01:18
paulunderwood is online now   Reply With Quote