From: "Jabari Z." Date: 2013-06-27T12:48:22+09:00 Subject: Faster primality testing and factorization methods in Ruby I have created various implementations of methods to replace prime? and prime_division (from the standard lib file prime.rb) based on a class of mathematical operators I've developed called prime generators (PG).Using a special form of these PG I term Strictly Prime (SP) prime generators I have created extremely simple and fast algorithms that can find all the primes up to some number n, determine the primality of n, or factorization. Below are links to the paper which provides the mathematical basis for the proposed methods with two tables of benchmark results comparing the performance of the library methods prime? and prime_division with my proposed methods. I provide test results on 32-bit and 64-bit Linux systems using 5 reference primes of 17 to 19 digits. My paper, 'Improved Primality Testing and Factorization in Ruby' http://www.scribd.com/doc/150217723/Improved-Primality-Testing-and-Factorization-in-Ruby The code rile 'primeszp.rb' is available in my github repository: https://gist.github.com/jzakiya/455f2357cdb08f4ee1c4 Attachments: http://www.ruby-forum.com/attachment/8542/Improved_Primality_Testing_and_Factorization_in_Ruby.pdf http://www.ruby-forum.com/attachment/8543/primeszp.rb -- Posted via http://www.ruby-forum.com/.