| Topic: |
Science > Physics |
| User: |
"dedanoe" |
| Date: |
22 Sep 2006 05:28:04 AM |
| Object: |
dedanoe's supersonic primality criterion |
Primes are wholly numbers!
They divide only with their self to give ONE
and with ONE to give their self
and ONE is GOD product of ALL and NOTHING!
function BCD(x, y: Int64): Integer;
begin
if Abs(y)>0 then Result:= BCD(y, x mod y) else Result:= x;
end;
//if PrimeTestis returns True then N is Prime else N is Composite
function PrimeTesticals(N: Int64): Boolean;
var x, y: Integer;
begin
x:= Trunc(Sqrt(N)); y:= N-x*(x+1);
if Abs(BCD(x*(x+1), y))<>1 then Result:= False
else if Abs(BCD((x-y)*(x+1), y*(x+2)))<>1 then Result:= False
else Result:= True;
end;
Dobri Karagorgov -- Dedanoe
schizo-paranoid-lever-sex-pert
http://dedanoe.tripod.com
.
|
|
| User: "dedanoe" |
|
| Title: Re: dedanoe's supersonic primality criterion |
22 Sep 2006 05:51:23 AM |
|
|
why on this page (http://dedanoe.tripod.com/WebForm1.aspx) the
textboxes and buttons don't show? on that site i have the
implementation for this primality criterion. it's made with Delphi.NET
dedanoe =D0=BD=D0=B0=D0=BF=D0=B8=D1=88=D0=B0:
Primes are wholly numbers!
They divide only with their self to give ONE
and with ONE to give their self
and ONE is GOD product of ALL and NOTHING!
function BCD(x, y: Int64): Integer;
begin
if Abs(y)>0 then Result:=3D BCD(y, x mod y) else Result:=3D x;
end;
//if PrimeTestis returns True then N is Prime else N is Composite
function PrimeTesticals(N: Int64): Boolean;
var x, y: Integer;
begin
x:=3D Trunc(Sqrt(N)); y:=3D N-x*(x+1);
if Abs(BCD(x*(x+1), y))<>1 then Result:=3D False
else if Abs(BCD((x-y)*(x+1), y*(x+2)))<>1 then Result:=3D False
else Result:=3D True;
end;
Dobri Karagorgov -- Dedanoe
schizo-paranoid-lever-sex-pert
http://dedanoe.tripod.com
.
|
|
|
| User: "dedanoe" |
|
| Title: Re: dedanoe's supersonic primality criterion |
22 Sep 2006 09:49:35 PM |
|
|
ignore this partial solution!
dedanoe wrote:
why on this page (http://dedanoe.tripod.com/WebForm1.aspx) the
textboxes and buttons don't show? on that site i have the
implementation for this primality criterion. it's made with Delphi.NET
dedanoe =D0=BD=D0=B0=D0=BF=D0=B8=D1=88=D0=B0:
Primes are wholly numbers!
They divide only with their self to give ONE
and with ONE to give their self
and ONE is GOD product of ALL and NOTHING!
function BCD(x, y: Int64): Integer;
begin
if Abs(y)>0 then Result:=3D BCD(y, x mod y) else Result:=3D x;
end;
//if PrimeTestis returns True then N is Prime else N is Composite
function PrimeTesticals(N: Int64): Boolean;
var x, y: Integer;
begin
x:=3D Trunc(Sqrt(N)); y:=3D N-x*(x+1);
if Abs(BCD(x*(x+1), y))<>1 then Result:=3D False
else if Abs(BCD((x-y)*(x+1), y*(x+2)))<>1 then Result:=3D False
else Result:=3D True;
end;
Dobri Karagorgov -- Dedanoe
schizo-paranoid-lever-sex-pert
http://dedanoe.tripod.com
.
|
|
|
|
|

|
Related Articles |
|
|