Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vb3h8k$1rp0b$1@raubtier-asyl.eternal-september.org>
Deutsch   English   Français   Italiano  
<vb3h8k$1rp0b$1@raubtier-asyl.eternal-september.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c++
Subject: Re: OT: Re: Sieve of Erastosthenes optimized to the max
Date: Mon, 2 Sep 2024 07:08:37 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <vb3h8k$1rp0b$1@raubtier-asyl.eternal-september.org>
References: <ul41d4$2koct$1@raubtier-asyl.eternal-september.org>
 <86ttibod7n.fsf@linuxsc.com> <86h6eaoi2r.fsf@linuxsc.com>
 <v4sool$1grge$1@dont-email.me> <867celixcw.fsf@linuxsc.com>
 <v5sg9s$mat4$1@dont-email.me> <86zfr0b9hw.fsf@linuxsc.com>
 <v638ud$25623$1@dont-email.me> <861q3o5do1.fsf@linuxsc.com>
 <v7tdts$29195$1@dont-email.me> <868qx45v5g.fsf@linuxsc.com>
 <v9lbns$11alj$1@dont-email.me> <86r0aojx1m.fsf@linuxsc.com>
 <v9o2kf$1gqv1$1@raubtier-asyl.eternal-september.org>
 <va09jq$30cvv$1@dont-email.me>
 <va2ca2$3e60e$1@raubtier-asyl.eternal-september.org>
 <va2cfr$3e9l1$1@raubtier-asyl.eternal-september.org>
 <va2hq5$3f1gl$1@dont-email.me> <86v7zn3xwk.fsf@linuxsc.com>
 <vajji3$2rbid$1@raubtier-asyl.eternal-september.org>
 <vb2if8$1jqts$2@dont-email.me> <86tteyrad0.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 02 Sep 2024 07:08:37 +0200 (CEST)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="ff4c3fa30b526abb7c34e7610858e881";
	logging-data="1958923"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX197JnnIPJJpiN2VhuVA9GV3bJw7Iw0fP8w="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:PYBGzhmAM3bFyy4zMS4hXreXdSQ=
Content-Language: de-DE
In-Reply-To: <86tteyrad0.fsf@linuxsc.com>
Bytes: 2900

Am 02.09.2024 um 05:40 schrieb Tim Rentsch:

> This is a brainless statement (and incidentally illustrates why I
> was motivated not to read postings from BM).  In fact no primes need
> be pre-calculated to determine whether any given number is prime.
> The point of using a sieve is the sieve method is much faster than
> not using one.  For example, suppose we want to determine all primes
> less than a trillion.  Taking the approach of pre-computing only
> those primes less than a million (the square root) and then testing
> numbers individually takes more than 100 times as many operations as
> using a sieve.  Furthermore the operations used are more expensive
> for the non-sieve approach - simply setting a bit in the case of a
> sieve, versus computing a remainder in the non-sieve case.


I don't wanted to say that each numbe is indivually sieved against all
primes up to the square root but a range. I do that myself to speed up
the computation.