2011-08-29, 18:53   #2
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts

Quote:
 Originally Posted by JohnFullspeed I need to find the first multiple of a prime number > an offset i/e Let Offset be 223092870 Let P be 21247 I want N like Offfset+N = 223 093 500 = 105000 * 12247 223092870 div 21247 = 10499 Code: 223093500 -223092870 = 630 = N I code this but I have a problem when the offset change I do N:=P-(offset mod p) Is the problem in the pollynome ? Thanks
1)the bold is a massive arithmetic error ( yes I've checked it, and I'm guessing it's a typo?)
2)the underline is a line I personally don't see the use for
3)the italic is a spelling error
4) really because the line I wrapped in code tags says (Offset+N)-Offset = N

5) I come to: X=Offset+(P-(Offset%P)) working no ?