Documentation ¶
Index ¶
- Variables
- func AddInt32(a, b int32) int32
- func AddInt32WithError(a, b int32) (int32, error)
- func AddInt64(a, b int64) int64
- func AddUint64(a, b uint64) uint64
- func AddUint64WithErr(a, b uint64) (uint64, error)
- func MulUint64(a, b uint64) uint64
- func MulUint64WithErr(a, b uint64) (uint64, error)
- func SubInt(a, b int) int
- func SubUint64(a, b uint64) uint64
Constants ¶
This section is empty.
Variables ¶
var ErrAdditionOverflow = errors.New("addition overflow")
ErrAdditionOverflow is raised when there is an overflow because of the addition of two numbers
var ErrMultiplicationOverflow = errors.New("multiplication overflow")
ErrMultiplicationOverflow is raised when there is an overflow because of the multiplication of two numbers
var ErrSubtractionUnderflow = errors.New("subtraction underflow")
ErrSubtractionUnderflow is raised when there is an underflow because of the subtraction of two numbers
Functions ¶
func AddInt32 ¶ added in v1.0.1
AddInt32 performs addition on int32 and logs an error if the addition overflows
func AddInt32WithError ¶ added in v1.0.1
AddInt32WithError performs addition on int32 and returns an error if the addition overflows
func AddInt64 ¶ added in v1.0.1
AddInt64 performs addition on int64 and logs an error if the addition overflows
func AddUint64WithErr ¶ added in v1.0.1
AddUint64WithErr performs addition on uint64 and returns an error if the addition overflows
func MulUint64 ¶ added in v1.0.1
MulUint64 performs multiplication on uint64 and logs an error if the multiplication overflows
func MulUint64WithErr ¶ added in v1.0.1
MulUint64WithErr performs multiplication on uint64 and returns an error if the multiplication overflows
Types ¶
This section is empty.