This library adds several functions useful for doing math on integers. Most of these are GMP wrappers that may have faster implimentations for smaller integer types.
Functions
iroot(x::Integer, n::integer)the integer nth root ofx. Specifically, this is the largest integerasuch thata^n <= x. Note thatnmust fit into anInt64(for GMP compatability).ispower(x::Integer)return if there are integerbaseandexponent>1values such thatbase^exponent = x.find_exponent(x::Integer)returns the largest possible integerexponentsuch thatbase^exponent = xfor somebase. Returns1forx ∈ [0,1].is_probably_prime(x::Integer; reps=25)returns ifxis prime. Will be incorrect less than4^-repsof the time.kronecker(a::Integer, n::Integer)Computes the Kronecker_symbol which is a generalization of the legendre and jacobi symbols.