Documentation ¶
Index ¶
- func Convergent(n int, fn convergentSeries) (*big.Int, *big.Int)
- func DigitSum(n int) int
- func DigitsToInt(digits []int) int
- func Divisors(n int) []int
- func E(n int) int64
- func EqualIntSlice(a, b []int) bool
- func Factors(n int) []int
- func FactorsCounted(n int) map[int]int
- func GCD(a, b int) int
- func GCDBigInt(a, b *big.Int) *big.Int
- func Harshad(n int) bool
- func IntToDigits(n int) []int
- func IsCube(n int) bool
- func IsInt(n float64) bool
- func IsSquare(n int) bool
- func LCM(a, b int) int
- func LCMBigInt(a, b *big.Int) *big.Int
- func MaxBigInt(a, b *big.Int) *big.Int
- func MinBigInt(a, b *big.Int) *big.Int
- func MulFraction(n1, d1, n2, d2 int) (int, int)
- func MulFractionBigInt(n1, d1, n2, d2 *big.Int) (*big.Int, *big.Int)
- func NextSquare(n uint) (uint, uint)
- func PascalTriangle(max int) [][]int
- func ReduceFraction(n, d int) (int, int)
- func ReduceFractionBigInt(n, d *big.Int) (*big.Int, *big.Int)
- func Reverse(digits []int) []int
- func Sqrt2(n int) int64
- func SquareFree(n int) bool
- func SumFraction(n1, d1, n2, d2 int) (int, int)
- func SumFractionBigInt(n1, d1, n2, d2 *big.Int) (*big.Int, *big.Int)
- func Totient(n int) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convergent ¶
Convergent returns the nth convergence of whichever series you pass in a function for
func DigitsToInt ¶
DigitsToInt converts a slice of digits to an int
func EqualIntSlice ¶
EqualIntSlice returns true if the two slices have identical contents
func FactorsCounted ¶
FactorsCounted returns counts of how many times each factor divides into n
func IntToDigits ¶
IntToDigits converts an int into a slice of its component digits
func MulFraction ¶
MulFraction returns the product of the two fractions, still in fraction form
func MulFractionBigInt ¶ added in v0.0.11
MulFractionBigInt returns the product of the two fractions, still in fraction form
func NextSquare ¶
NextSquare returns the next highest square and its square root
func PascalTriangle ¶
PascalTriangle returns a triangle of the max depth specified
func ReduceFraction ¶
ReduceFraction returns the lowest that n and d reduce to
func ReduceFractionBigInt ¶ added in v0.0.11
ReduceFractionBigInt returns the lowest that n and d reduce to
func SquareFree ¶
SquareFree returns true if no square of a prime divides n
func SumFraction ¶
SumFraction returns the sum of the two fractions, still in fraction form
func SumFractionBigInt ¶ added in v0.0.11
SumFractionBigInt returns the sum of the two fractions, still in fraction form
Types ¶
This section is empty.