mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Math (https://www.mersenneforum.org/forumdisplay.php?f=8)
-   -   Mersenne NUmber Factoring (https://www.mersenneforum.org/showthread.php?t=228)

andi314 2002-11-25 12:44

Mersenne NUmber Factoring
 
I recently made a program with which you can factor Mersenne Numbers over 2^80000000.
Anyone who is interrested can have this program for free.( You only need UBASIC) Please contact me at andi314@gmx.de

[b][i]Mod edit: Title changed to remove HTML formatting...[/i][/b]

Deamiter 2002-11-25 18:15

How fast can your program factor to 2^66? That seems to be the benchmark for similar factoring programs...

andi314 2002-11-26 13:23

[quote="Deamiter"]How fast can your program factor to 2^66? That seems to be the benchmark for similar factoring programs...[/quote]

Sorry bur i don't know the exact dates because I haven't tested it yet.

But for anyone who wants to join to help me finding some factors:
:arrow: YOU ARE WELCOMED!!!

smh 2002-11-26 13:32

Can you post the source here? (between code tags)

andi314 2002-11-26 14:25

[quote="smh"]Can you post the source here? (between code tags)[/quote]

it is a UBASIC program:
[code:1]001 p=100000 ' Change this value if you wan to have a faster screen output
002 IF exist("allfactor.txt") print "Please send the allfactor.txt file to andi314@gmx.de"
003 if not exist("start.ubd") print "Mersenne Factorisation Program"
009 if not exist("start.ubd") print "Please enter an exponent and a starting factor!"
010 if exist("start.ubd") open "start.ubd" for input as #1
011 if exist("factor.txt") doscmd "start file.exe"
012 if exist("start.ubd") input#1,a
013 if exist("start.ubd") input#1,b
014 if exist("start.ubd") print "exponent=";a
015 if exist("start.ubd") print "current factor=";b
016 if exist("start.ubd") close #1
017 if exist("start.ubd") then e=a
018 if exist("start.ubd") goto 080
019 input"Exponent=";e
020 if PRMDIV(e)<>e print "You didn't enter a prime number!!! Please try again!"
030 if PRMDIV(e)<>e goto 019
040 input"Start=";b
080 c=int(b/2/e)-2
090 if c<=-1 then clr c
100 inc c
110 if inkey="E" goto 930
120 k=2*c*e+1
126 if c@p=0 print e,c,k,(int(log(k)/log(2)*100000000)) /100000000
127 if k@3=0 or k@5=0 or k@7=0 goto 100
150 if k@8<>7 and k@8<>1 goto 100
160 if c@1000000=0 open "start.ubd" for create as #1
170 if c@1000000=0 print #1,e, k
180 if c@1000000=0 close #1
190 q=1
200 x=e
210 y=int(log(e)/log(2))+1
300 dec y
400 if x-2^y>=0 z=1
500 if x-2^y<0 clr z
510 q=(q^2)@k
600 if z=1 then q=(q*2)@k
700 if z=1 x=x-2^y
800 if y>0 goto 300
900 if q>1 goto 100
930 open "start.ubd" for create as #1
940 print #1,e, k
950 close #1
951 if modpow(2,e,k)=1 kill "start.ubd"
952 if modpow(2,e,k)=1 open "factor.txt" for create as #1
953 if modpow(2,e,k)=1 print#1,e,k
954 if modpow(2,e,k)=1 close #1
955 if exist("factor.txt") doscmd "start file.exe"
956 if modpow(2,e,k)=1 print e;"has a factor:";k
957 if modpow(2,e,k)<>1 print e;"has no factor up to";k
958 if modpow(2,e,k)=1 print "Please send the allfactor.txt file to andi314@gmx.de"
960 print "ENDE"
970 SYSTEM
[/code:1]


All times are UTC. The time now is 17:44.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.