Dedanoe's Method of Reductive Modulo for Prime Testis
(I am done with Primes)
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 PrimeTestis(N: Int64): Boolean;
var x: Int64;
begin
x:= Trunc(Sqrt(N)) or Trunc(Sqrt(N)) + Trunc(Sqrt(N)) mod 2;
while N mod x > 1 do x:= N mod x;
if N mod x = 0 then
Result:= False // Output 'N is Composite'
else
Result:= True; // Output 'N is Prime'
end;
You see the large integer N gives greater modulo divided with outher
integer near its root. starting from that integer we reduce the modulo.
If the smallest modulo is 1 then N is 100% Prime else the smallest
modulo will be zero thus N is Composite.
Dobri Karagorgov -- Dedanoe
schizo-paranoid-lever-sex-pert
http://dedanoe.tripod.com
HOW DO YOU LIKE ME NOW?
.
|