Re: A very slow program

Liste des GroupesRevenir à cl c 
Sujet : Re: A very slow program
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 03. Oct 2024, 00:43:45
Autres entêtes
Organisation : None to speak of
Message-ID : <87frpeqg66.fsf@nosuchdomain.example.com>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13)
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
For ordinary users it's probably sufficient to use an existing
program; on Unix 'primes 1 1000000000' runs in about 8 seconds.
And it's checking 2^32 numbers in 50 seconds (including 'wc'
and creating output [suppressed by redirection]), generating
50847534 primes. A simple prime test of some "arbitrary large"
number runs in no time, as does factorization of numbers with
the Unix'es 'factor' program. Just a simple command line call.
That existing 'primes' program also has some limit; the man page
documents a value of 4294967295, but no error message is created
for values up to around 1.8446744*10^19 on my system.

On my system (Ubuntu 22.04.5 LTS, 64 bits), the primes(1) man page says:

"The stop value must not be greater than 3825123056546413050."

4294967295 is of course 2**31-1.  I don't know the significance of
3825123056546413050.  The change was made by Debian, but the sources
don't explicitly give a reason.  Anyone who wants to look into it can
see the patches here:

https://salsa.debian.org/games-team/bsdgames

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
16 Sep 24 * A very slow program21Student Project
16 Sep 24 +- Re: A very slow program1Kaz Kylheku
16 Sep 24 +* Re: A very slow program3Paul
2 Oct 24 i`* Re: A very slow program2Vir Campestris
2 Oct 24 i `- Re: A very slow program1Paul
2 Oct 24 +* Re: A very slow program14Bonita Montero
3 Oct 24 i+* OT: Re: A very slow program12Vir Campestris
4 Oct 24 ii`* Re: OT: Re: A very slow program11Bonita Montero
20 Oct 24 ii `* Re: OT: Re: A very slow program10Vir Campestris
20 Oct 24 ii  +* Re: OT: Re: A very slow program2Kenny McCormack
26 Oct 24 ii  i`- Re: OT: Re: A very slow program1Vir Campestris
21 Oct 24 ii  +* Re: OT: Re: A very slow program6Bonita Montero
26 Oct 24 ii  i`* Re: OT: Re: A very slow program5Vir Campestris
26 Oct 24 ii  i `* Re: OT: Re: A very slow program4Bonita Montero
26 Oct 24 ii  i  `* Re: OT: Re: A very slow program3Vir Campestris
27 Oct 24 ii  i   `* Re: OT: Re: A very slow program2Bonita Montero
28 Oct 24 ii  i    `- Re: OT: Re: A very slow program1Vir Campestris
22 Oct 24 ii  `- Re: OT: Re: A very slow program1Richard Harnden
3 Oct 24 i`- Re: A very slow program1Paul
2 Oct 24 `* Re: A very slow program2Janis Papanagnou
3 Oct 24  `- Re: A very slow program1Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal