primes

package
v0.0.0-...-b32a2c2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: GPL-3.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPrimality

func CheckPrimality(number *big.Int) bool

ChecknPrimality checks whether number is a prime.

func DisplayFailPretty

func DisplayFailPretty(number *big.Int, timeTaken time.Duration)

DisplayFailPretty displays failed prime generations nicely.

func DisplayPrimePretty

func DisplayPrimePretty(number *big.Int, timeTaken time.Duration)

DisplayPrimePretty displays successful prime generations nicely.

func GetCurrentId

func GetCurrentId() uint64

GetCurrentId returns the current id, rounded to nearest hundred

func GetTotalPrimeCount

func GetTotalPrimeCount() uint64

GetTotalPrimeCount finds the number of lines in each file

func Round

func Round(x, unit float64) float64

Round() is used to round numbers to the nearest x

func ShowCurrentCount

func ShowCurrentCount()

ShowCurrentCount displays the n number of primes calculated

Types

type Prime

type Prime struct {
	Id        uint64
	Value     *big.Int
	TimeTaken time.Duration
	IsValid   bool
}

Jump to

Keyboard shortcuts

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