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 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 MulFraction(n1, d1, n2, d2 int) (int, int)
- func NextSquare(n uint) (uint, uint)
- func PascalTriangle(max int) [][]int
- func ReduceFraction(n, d int) (int, 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 Totient(n int) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convergent ¶
Convergent returns the nth convegence 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 NextSquare ¶
NextSquare returns the next highest square and its square root
func PascalTriangle ¶
PascalTriangle returns a triangle of the max depth specified
func ReduceFraction ¶
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
Types ¶
This section is empty.