link to prime tests from prime docs
							parent
							
								
									7869821de9
								
							
						
					
					
						commit
						bf528dcddd
					
				| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
! Copyright (C) 2007-2009 Samuel Tardieu.
 | 
					! Copyright (C) 2007-2009 Samuel Tardieu.
 | 
				
			||||||
! See http://factorcode.org/license.txt for BSD license.
 | 
					! See http://factorcode.org/license.txt for BSD license.
 | 
				
			||||||
USING: arrays combinators kernel make math math.functions math.primes sequences ;
 | 
					USING: arrays combinators kernel make math math.functions
 | 
				
			||||||
 | 
					math.primes sequences ;
 | 
				
			||||||
IN: math.primes.factors
 | 
					IN: math.primes.factors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<PRIVATE
 | 
					<PRIVATE
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -49,9 +49,8 @@ HELP: unique-primes
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
{ $description "Generates a sequence of " { $snippet "n" } " unique prime numbers with exactly " { $snippet "numbits" } " bits." } ;
 | 
					{ $description "Generates a sequence of " { $snippet "n" } " unique prime numbers with exactly " { $snippet "numbits" } " bits." } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
ARTICLE: "math.primes" "Prime numbers"
 | 
					ARTICLE: "math.primes" "Prime numbers"
 | 
				
			||||||
"The " { $vocab-link "math.primes" } " vocabulary implements words related to prime numbers." $nl
 | 
					"The " { $vocab-link "math.primes" } " vocabulary implements words related to prime numbers. Serveral useful vocabularies exist for testing primality. The Sieve of Eratosthenes in " { $vocab-link "math.primes.erato" } " is useful for testing primality below five million. For larger integers, " { $vocab-link "math.primes.miller-rabin" } " is a fast probabilstic primality test. The " { $vocab-link "math.primes.lucas-lehmer" } " vocabulary implements an algorithm for finding huge Mersenne prime numbers." $nl
 | 
				
			||||||
"Testing if a number is prime:"
 | 
					"Testing if a number is prime:"
 | 
				
			||||||
{ $subsection prime? }
 | 
					{ $subsection prime? }
 | 
				
			||||||
"Generating prime numbers:"
 | 
					"Generating prime numbers:"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue