intmath

package
v0.0.0-...-ba6142f Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T constraints.Integer](x T) T

Abs returns the absolute value of x.

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.

Jump to

Keyboard shortcuts

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