Documentation
¶
Overview ¶
Package overflow offers overflow-checked integer arithmetic operations for all signed and unsigned integer types. Each of the operations returns a result,bool combination.
The functions support all types convertible to unsigned or signed integer types. The modulo % operation is not present, as it is always safe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Addp ¶
func Addp[N Number](a, b N) N
Addp returns the sum of two numbers, panicking on overflow.
func Divp ¶
func Divp[N Number](a, b N) N
Divp returns the quotient of two numbers, panicking on overflow.
func Mulp ¶
func Mulp[N Number](a, b N) N
Mulp returns the product of two numbers, panicking on overflow.
Types ¶
Click to show internal directories.
Click to hide internal directories.