Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject: [': 0.09; 'things,': 0.09; 'cc:addr:python-list': 0.11; 'all...': 0.16; 'subject:Prime': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'so.': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'url:wiki': 0.31; 'coded': 0.31; "d'aprano": 0.31; 'division': 0.31; 'steven': 0.31; 'url:wikipedia': 0.31; 'ago': 0.33; 'but': 0.35; 'charset:us- ascii': 0.36; 'url:org': 0.36; 'subject:]': 0.38; 'how': 0.40; 'even': 0.60; 'content-disposition:inline': 0.62; 'field': 0.63; 'trial': 0.83; 'mathematica': 0.84; 'received:82.223': 0.84 Date: Sat, 6 Sep 2014 12:53:16 +0200 From: Manolo =?iso-8859-1?Q?Mart=EDnez?= To: Steven D'Aprano 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=us-ascii Content-Disposition: inline In-Reply-To: <540ae440$0$29995$c3e8da3$5496439d@news.astraweb.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Sat, 06 Sep 2014 19:41:19 +0200 Cc: python-list@python.org 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1410025280 news.xs4all.nl 2840 [2001:888:2000:d::a6]:56992 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77658 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). I coded a Mathematica implementation fifteen years ago or so. It was a lot of work :) Manolo