Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.108 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.79; '*S*': 0.00; 'subject: [': 0.09; 'things,': 0.09; 'all...': 0.16; 'subject:Prime': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'header:In- Reply-To:1': 0.27; 'url:wiki': 0.31; "d'aprano": 0.31; 'division': 0.31; 'sep': 0.31; 'steven': 0.31; 'url:wikipedia': 0.31; 'no,': 0.35; 'but': 0.35; '+0200,': 0.36; 'url:org': 0.36; 'subject:]': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'course': 0.61; 'content- disposition:inline': 0.62; 'field': 0.63; 'trial': 0.83; 'received:82.223': 0.84 Date: Sun, 7 Sep 2014 21:09:51 +0200 From: Manolo =?iso-8859-1?Q?Mart=EDnez?= To: python-list@python.org Subject: Re: Prime testing [was Re: My backwards logic] References: <1enj0att6bkrnvb81rhma5dbuk3h28agl8@4ax.com> <540ae440$0$29995$c3e8da3$5496439d@news.astraweb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Sun, 07 Sep 2014 21:14:14 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1410117255 news.xs4all.nl 2893 [2001:888:2000:d::a6]:50950 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77682 On 09/07/14 at 06:53pm, Peter Pearson wrote: > On Sat, 6 Sep 2014 12:53:16 +0200, Manolo Martínez wrote: > > On 09/06/14 at 08:38pm, Steven D'Aprano wrote: > >> But even that's not how the specialists do it. If you want to check whether > >> (say) 2**3000+1 is prime, you don't want to use trial division at all... > > > > When I was interested in these things, specialists would use the [number > > field sieve](https://en.wikipedia.org/wiki/General_number_field_sieve). > > No, one uses the number field sieve to *factor* large numbers. - Ugh. That's what I meant, of course :/