# Module prime

- Description
- Data Types
- Function Index
- Function Details

prime number module implemented method: trail division.

Copyright © 2012-2014 Zuse Institute Berlin

Version: $Id$

Authors: Maik Lange (`malange@informatik.hu-berlin.de`).

References

- 2009 - Melissa E. O'Neill The Genuine Sieve of Eratosthenes Journal of Functional Programming 19(1) pp: 95-106 Implemented Method: Trial Division

## Description

prime number module implemented method: trail division

## Data Types

### prime()

    prime() = pos_integer()

### prime_list()

    prime_list() = [prime()]

### rev_prime_list()

    rev_prime_list() = [prime()]

## Function Index

get/1 | returns all primes less than or equal to N.
get_feeder/1 |
get_nearest/1 | returns first prime larger than N.
get_nearest_feeder/1 |
is_prime/1 |
is_prime_feeder/1 |
prime_cache/0 | list of all primes less than 5003 from http://primes.utm.edu/lists/small/10000.txt.
tester_create_prime_list/1 |
tester_create_rev_prime_list/1 |
tester_is_prime_list/1 |

## Function Details

### get_nearest_feeder/1

    get_nearest_feeder(N :: 1..5250) -> {1..5250}

### get_nearest/1

    get_nearest(N :: pos_integer()) -> prime()

returns first prime larger than N

### is_prime_feeder/1

    is_prime_feeder(N :: 1..5250) -> {1..5250}

### is_prime/1

    is_prime(V :: pos_integer()) -> boolean()

### get_feeder/1

    get_feeder(N :: 1..5250) -> {1..5250}

### get/1

    get(N :: pos_integer()) -> prime_list()

returns all primes less than or equal to N

### prime_cache/0

    prime_cache() -> prime_list()

list of all primes less than 5003 from http://primes.utm.edu/lists/small/10000.txt

### tester_create_prime_list/1

    tester_create_prime_list(N :: 1..2500) -> prime_list()

### tester_create_rev_prime_list/1

    tester_create_rev_prime_list(N :: 1..2500) -> rev_prime_list()

### tester_is_prime_list/1

    tester_is_prime_list(List :: prime_list()) -> boolean()

Generated by EDoc, Apr 22 2017, 15:58:21.