Login   Register  
PHP Classes
elePHPant
Icontem

PHP Prime Number Test: Check if a number is prime in several ways

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Carlos Sosa
Name: Carlos Sosa <contact>
Classes: 5 packages by
Country: United States United States
Age: 26
All time rank: 1951252 in United States United States
Week rank: 464 Up42 in United States United States Up
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz  
This class can check if a number is prime in several ways.

It can take a given number and check if it is prime using different methods.

Currently it tests the numbers using the methods: Standard test, Miller-Robin, Fermat Littler Theorem and GMP Library.

The class can also find the next and previous prime numbers near a given number.

  Classes of Carlos Sosa  >  PHP Prime Number Test  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Prime Number Test
Base name: prime-tester
Description: Check if a number is prime in several ways
Version: 1.0
PHP version: 5.3
License: GNU General Public License (GPL)
All time users: 195 users
All time rank: 7187
Week users: 1 user
Week rank: 1432 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image Algorithms Numerical and statistical algorithms View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Math Math related classes. View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
August 2013
Number 6
Prime numbers are numbers that have special properties and are useful for several types of math operations and algorithms.

This class can help not only checking if a number is prime using several possible algorithms, but also can find the next and the previous prime number near a given number.

Manuel Lemos

  User ratings  
Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Files folder imageException (1 file)
Files folder imageTest (5 files)
Plain text file index.php Example Example script
Plain text file LICENSE Data Auxiliary data
Plain text file PrimeTester.php Class Class source
Plain text file prime_list.php Example Example script
Plain text file prime_next.php Example Example script
Plain text file README.md Data Documentation
Plain text file RESULTS Output Sample output

  Files folder image Files  /  Exception  
File Role Description
  Plain text file FailRequirementException.php Class Class source

  Files folder image Files  /  Test  
File Role Description
  Plain text file FermatLittleTheoremTest.php Class Class source
  Plain text file GMPLibraryTest.php Class Class source
  Plain text file MillerRobinTest.php Class Class source
  Plain text file SimpleTest.php Class Class source
  Plain text file TestInterface.php Class Class source

Download Download all files: prime-tester.tar.gz prime-tester.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.