tag:blogger.com,1999:blog-835341608950140555.post7631306534593538485..comments2023-03-19T09:28:30.724+01:00Comments on Numerical Recipes: Prime Numbers 1. The Wrong WayJaimehttp://www.blogger.com/profile/02831887559711602902noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-835341608950140555.post-47378162617155112302009-03-18T20:25:00.000+01:002009-03-18T20:25:00.000+01:00While I hope the code I write ends up being good e...While I hope the code I write ends up being good enough so that this blog can serve as a repository of algorithms, and truly be a numerical cookbook, the true purpose is to give some insight into why things are done the way they are done.<BR/><BR/>I haven't benchmarked them, but the code in the links you people have posted looks as if it should perform at least as good as the best I can produce. They all are much better than what this post holds, which is why it is titled "Prime Numbers the Wrong Way"...<BR/><BR/>I actually deal with some of the algorithms in Charles and Louis links in my new post:<BR/><BR/>http://numericalrecipes.blogspot.com/2009/03/prime-numbers-2-sieving-of-erathostenes.html<BR/><BR/>Primality testing, both in probabilistic and deterministic fashions, will have to wait a little longer, but will also find their way to these pages.<BR/><BR/>There is a great review on many of these subjects that can be found here as well:<BR/><BR/>http://krenzel.info/?p=83<BR/><BR/>In any case, thanks for commenting!Jaimehttps://www.blogger.com/profile/02831887559711602902noreply@blogger.comtag:blogger.com,1999:blog-835341608950140555.post-66333634168009780292009-03-18T18:24:00.000+01:002009-03-18T18:24:00.000+01:00Here's really fast primality testing. Probabilisti...Here's really fast primality testing. Probabilistic, but good enough for all purposes and widely used:<BR/><BR/>http://eli.thegreenplace.net/2009/02/21/rabin-miller-primality-test-implementation/Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-835341608950140555.post-84133776241108799162009-03-18T10:25:00.000+01:002009-03-18T10:25:00.000+01:00see also :http://code.activestate.com/recipes/5765...see also :<BR/>http://code.activestate.com/recipes/576596/Unknownhttps://www.blogger.com/profile/05339662769038811146noreply@blogger.comtag:blogger.com,1999:blog-835341608950140555.post-42282271184820363542009-03-18T05:01:00.000+01:002009-03-18T05:01:00.000+01:00Check out http://www.tiawichiresearch.com/?p=44 fo...Check out http://www.tiawichiresearch.com/?p=44 for testing the primality of a numberUnknownhttps://www.blogger.com/profile/02642590751854772030noreply@blogger.com