primey

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index

func Index(p int) int

Index returns the index of the given number in the sorted list of primes

func Iter

func Iter() func(func(int, int) bool)

Iter returns an iterator over all Primes

func Iterr

func Iterr(start, end int) func(func(int, int) bool)

Iterr returns an iterator over a range of Primes

func Len

func Len() int

Len returns the length of the list of primes

func Pi

func Pi(n int) int

Pi returns the number of primes below (and including) n

func Prime

func Prime(p int) bool

Prime returns true if p is a prime

func SlowPrime

func SlowPrime(n int) bool

SlowPrime returns whether a number is prime or not, using a brute force search

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL