package
5.2.0
Repository: https://github.com/prysmaticlabs/prysm.git
Documentation: pkg.go.dev

# Functions

Add64 adds 2 64-bit unsigned integers and checks if they lead to an overflow.
AddInt adds two or more integers and checks for integer overflows.
CachedSquareRoot implements Newton's algorithm to compute the square root of the given uint64 starting from the last cached value.
CeilDiv8 divides the input number by 8 and takes the ceiling of that number.
Div64 divides two 64-bit unsigned integers and checks for errors.
Int returns the integer value of the uint64 argument.
IntegerSquareRoot defines a function that returns the largest possible integer root of a number using go's standard library.
IsPowerOf2 returns true if n is an exact power of two.
IsValidUint256 given a bigint checks if the value is a valid Uint256.
Max returns the larger integer of the two given ones.This is used over the Max function in the standard math library because that max function has to check for some special floating point cases making it slower by a magnitude of 10.
Min returns the smaller integer of the two given ones.
Mod64 finds remainder of division of two 64-bit unsigned integers and checks for errors.
Mul64 multiples 2 64-bit unsigned integers and checks if they lead to an overflow.
PowerOf2 returns an integer that is the provided exponent of 2.
Sub64 subtracts two 64-bit unsigned integers and checks for errors.

# Variables

ErrOverflow occurs when an operation exceeds max or minimum values.
ErrOverflow occurs when an operation exceeds max or minimum values.
ErrOverflow occurs when an operation exceeds max or minimum values.
ErrOverflow occurs when an operation exceeds max or minimum values.
ErrOverflow occurs when an operation exceeds max or minimum values.