Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GCD ¶
func GCD[T constraints.Integer](x, y T) T
GCD returns the greatest common divisor of x and y.
func MustPow ¶
func MustPow[T constraints.Integer](base, exp T) T
MustPow is similar to Pow, but it panics on overflow.
func Pow ¶
func Pow[T constraints.Integer](base, exp T) (result T, ok bool)
Pow returns base^exp, true. If the result overflows, it returns 0, false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.