Documentation ¶
Overview ¶
Package bigint implements a set of functions for big integer arithmetic.
Index ¶
- Variables
- func AddSmall(b []uint32, a uint32) int
- func AddWithOverflow(lh, rh uint32) (uint, bool)
- func FullAdd(lh, rh uint32, carry bool) (uint, bool)
- func IsNull(b []uint32) bool
- func MustAdd(b []uint32, rh []uint32)
- func MustCmp(lh, rh []uint32) int
- func MustSub(b []uint32, rh []uint32)
- func Not(b []uint32)
- func Reverse(a []byte) []byte
- func ReverseU(a []uint32) []uint32
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnequallySizedSlices = errors.New("operation not defined for differently sized slices") ErrSubtractionWithLeftovers = errors.New("could not subtract without leftovers") )
Errors for bigint package.
Functions ¶
func AddSmall ¶
AddSmall adds a small number to a big int and returns the index of the last carry over.
func AddWithOverflow ¶
AddWithOverflow returns left hand + right hand and whether it overflowed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.