20110811, 17:23  #34  
Jun 2003
1001100100101_{2} Posts 
Quote:
PS: for LL testing, there will only be two groups of bits  can you say why? PPS: can you relate this to divisibility rule for 9? can you generalize it from this? 

20110811, 18:03  #35  
"Forget I exist"
Jul 2009
Dumbassville
2^{6}·131 Posts 
Quote:
re:PS:yes because x never gets above p^2 which will have at most 2n bits ? re:PPS:no to both. Last fiddled with by science_man_88 on 20110811 at 18:05 Reason: PS was originally no 

20110811, 22:52  #36 
Dec 2007
Cleves, Germany
2×5×53 Posts 

20110812, 00:07  #37 
"Forget I exist"
Jul 2009
Dumbassville
2^{6}·131 Posts 

20110812, 01:48  #38  
Dec 2007
Cleves, Germany
2×5×53 Posts 
Quote:
128_{10} % 7_{10} = 200_{8} % 7_{8} = 2_{8} + 0_{8} + 0_{8} = 2_{8} = 2_{10}. Or, if you prefer binary (leading zeroes and spaces added for clarity): 128_{10} % 7_{10} = 010 000 000_{2} % 111_{2} = 010_{2} + 000_{2} + 000_{2} = 010_{2} = 2_{10}. 

20110812, 07:44  #39  
Romulan Interpreter
Jun 2011
Thailand
3^{3}×347 Posts 
Quote:
You can write any number x as x=2^{n}*a+b, by separating it in two parts, first n bits (from the right to the middle, somewhere) and the rest of the bits (from the middle to the left  first  most significant bit). This equation you can write like x=2^{n}*aa+a+b Then you group like: x=(2^{n}1)*a+a+b When you do mod m, with m=2^n1, the paranthesis is gone and what you get left is y=a+b, where b are last n LSBits of x, and a is the rest of the MSBits. Of course, if the result is bigger then m, you repeat the procedure until you get something smaller or equal to m (that fits on n bits). Please remark the "or equal" part. Because you always add positive numbers from which at least one is not null, you will never get 0. You will always get a number between 1 and m, inclusive, that is on binary (n bits) between 0...001 and 1...111, so in the case you got 1...111 then the modulus is 0. In the other cases, you got the right result. Now if you do LL tests, as I said in the first post, you always square numbers smaller then m, so you will never get more then 2m bits, that means you have to do the procedure only once. Examples (don't care where the numbers come from, either LL test, other calculus, my belly, etc): 55%31: 110111%11111= (group 5 bits from the right) 1 10111 % 11111 = (add the groups together) 1+10111 % 11111 = 11000 Decimal: 55%31=1+23=24 (mod 31)  the right result 165%15= 1010 0101 % 1111 = 1010+0101 = 1111 so 15 divides 165 961%31= 1111000001%31 = 11110 00001 %31 = 11111  that is 0, so 31 divides 961 etc. for your example, what you wrote down is 100 000 that is not 128, but 32 in decimal. Of course, 32 mod 7 makes 4. Last fiddled with by LaurV on 20110812 at 07:46 

20110812, 08:07  #40 
Romulan Interpreter
Jun 2011
Thailand
3^{3}×347 Posts 
I don't understand this part. GIMPS does not take any modulo operations in LL tests. P95 uses floating point FFT to square the numbers, which in return (in George's words) "it performs the modulo step for free". (see Math page on mersenne.org)

20120818, 15:15  #41 
May 2005
Argentina
2×3×31 Posts 
How to test your ANDROID cell phone warranty
Good? news! I migrated the old .jar code to android .apk
Now you can "test your android warranty" by downloading the lucas lehmer test from the market !! I'm currently testing on a SGS2, will post statistics when it finishes. (Warning: use at your own risk, I didn't optimize the code and it is barely tested) 
20120818, 17:36  #42  
May 2005
Argentina
2·3·31 Posts 
It finished!
Quote:
is prime!! Lasted: 9809679 miliseconds (That is 2hs 43min 30sec, on my Samsung Salaxy S II) Biggest prime number ever verified on a cell phone? Anyone brave enough to surpass that record? For comparison, I also tested : is prime !! Lasted: 196668 miliseconds (That is 3 min 17 sec, MUCH faster than the half an hour it lasted on your converted .apk version) I didn't optimize it, so I'm not sure why it is so much faster now. How do you know it only uses one core? It seems logical, but still I'm not sure. 

20120819, 14:35  #43 
Mar 2003
Melbourne
5·103 Posts 
ok, found the app on google play.
Tested M23209 on my HTC velocity 4G (1.5 GHz dual core) 197170ms  Craig 
20120819, 20:01  #44 
May 2005
Argentina
186_{10} Posts 
tested m23209
on motorola xt610 lasted 717510ms on chinese apad lasted 1264250ms 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Cell Phone AstroPhotography  Spherical Cow  Astronomy  59  20190121 22:47 
IRS Phone Scam  wblipp  Lounge  0  20140909 18:42 
Masking a PIN over a phone call.  Flatlander  Puzzles  35  20131031 10:34 
Cell+  tha  Hardware  1  20060907 16:24 
Prime95 on a cell phone  JuanTutors  Lounge  5  20040818 08:53 