mersenneforum.org How does this compute
 Register FAQ Search Today's Posts Mark Forums Read

 2019-06-19, 01:06 #1 tServo     "Marv" May 2009 near the Tannhäuser Gate 19·41 Posts How does this compute 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]
2019-06-19, 01:15   #2
paulunderwood

Sep 2002
Database er0rr

22·3·73 Posts

Quote:
 Originally Posted by tServo 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

 2019-06-19, 01:17 #3 hansl     Apr 2019 5×41 Posts https://en.wikipedia.org/wiki/Modula...cative_inverse Code: ? Mod(2633043,8388607)/9 %5 = Mod(5884965, 8388607) ? Mod(9,8388607)^-1 %6 = Mod(1864135, 8388607) ? Mod(1/9,8388607) %7 = Mod(1864135, 8388607) ? Mod(2633043*1864135, 8388607) %8 = Mod(5884965, 8388607) ?
 2019-06-22, 14:48 #4 tServo     "Marv" May 2009 near the Tannhäuser Gate 19·41 Posts Thanks ! I appreciate your time.

 Similar Threads Thread Thread Starter Forum Replies Last Post pepi37 Software 14 2018-09-08 01:26 airsquirrels GPU Computing 90 2017-12-08 00:13 NBtarheel_33 GPU Computing 54 2013-05-15 03:32 Christenson Hardware 0 2011-01-15 04:44 petrw1 Hardware 9 2007-08-13 14:38

All times are UTC. The time now is 08:04.

Mon May 16 08:04:03 UTC 2022 up 32 days, 6:05, 0 users, load averages: 0.87, 1.26, 1.25