Results 1 to 25 of 35

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739

    ++, 100000000 ( ), 1000000 ( ) . , , , Celeron-D 2.6GHz 512MB DDR400, . - ?

    , , - , , . , . , , .
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  2. #2
    Registered User
    Join Date: Apr:2006
    Location: Sofia
    Posts: 300
    - . . ! .

  3. #3
    Registered User
    Join Date: Oct:2002
    Location:
    Posts: 433
    - . ...

  4. #4
    Registered User
    Join Date: Apr:2006
    Location: Sofia
    Posts: 300
    Quote Originally Posted by [29]Fulcrum
    - . ...
    , , -. . :

    http://en.wikipedia.org/wiki/Sieve_of_Atkin

  5. #5
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    ~25 , : Debug , Release - , . printf("da"); 30000 -. Microsoft... .

    tedych, , . , , ...

    !
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  6. #6
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    Quote Originally Posted by 4eRNoBiL
    ~25 , : Debug , Release - , . printf("da"); 30000 -. Microsoft... .
    !
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  7. #7
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    , 10 - . , .. 2,3,5,7,11 13, 100 000 000 ...
    - , , . .

    : , .
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  8. #8
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    100 . 70 .

    EDIT: , - ( sqrt() sqr() , ), 100 8 !!
    , , , , -.. 8 . .
    Last edited by tedych; 22nd October 2006 at 00:25.

  9. #9
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    .
    ''? * *
    - !
    ...

  10. #10
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , .
    Code:
    procedure TForm1.Button1Click(Sender: TObject);
    const limit = 100000000;
    var n, x, y: Longword;
      k, s, rsqrtl, sqrx, sqry : Int64;
      is_prime:array[0..limit] of boolean;
    
    begin
    	label1.Caption:= 'Started...';
    	Application.ProcessMessages;
    
    	for n := 5 to limit do is_prime[n] := false;
    	rsqrtl := Round(sqrt(limit));
    
    	for x := 1 to rsqrtl do
    	begin
    		sqrx := sqr(x);
    	  for y := 1 to rsqrtl do
    	  begin
    	  	sqry := sqr(y);
    	    n := 4 * sqrx + sqry;
    	    if (n <= limit) and ( (n mod 12 = 1) or ((n mod 12 = 5)) ) then is_prime[n] := not is_prime[n];
    	    n := 3 * sqrx + sqry;
    	    if (n <= limit) and (n mod 12 = 7) then is_prime[n] := not is_prime[n];
    	    n := 3 * sqrx - sqry;
    	    if (x > y) and (n <= limit) and (n mod 12 = 11) then is_prime[n] := not is_prime[n];
    	  end;
    	end;
    
    	for n := 5 to rsqrtl do
    	begin
    	  if is_prime[n] then
    	  begin
    	     s:= sqr(n);
    	     k:= s;
    	     while (k<=limit) do
    	     begin
    	        is_prime[k] := false;
    	        k:= k + s;
    	     end;
    	  end;
    	end;
    
    	for n := 5 to limit do
    	begin
    	//	logika za izvejdane na chislata
    	end;
    
    	label1.Caption:= 'Stopped';
    end;

  11. #11
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    Quote Originally Posted by 4eRNoBiL
    , 10 - . , .. 2,3,5,7,11 13, 100 000 000 ...
    - , , . .
    1 -> 100 000 000 ~ 100 ~ 12 -> ?
    , !

  12. #12
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    Quote Originally Posted by Pesho
    1 -> 100 000 000 ~ 100 ~ 12 -> ?
    , 12 - 100 - , div, mod xor, and, or, , 100 - , .. 8 - , , , '' - , 1 , 7 . .
    , - , 0 1 , xor . , - -..

  13. #13
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    [bg]A za]o prosto ne polzwa[[/bg] std::vector<bool> ?
    , !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |