Documentation ¶
Index ¶
- func Add32WithOverflow(a, b int32) (r int32, ok bool)
- func Add32to64WithOverflow(a int32, b int64) (r int32, ok bool)
- func AddWithOverflow(a, b int64) (r int64, ok bool)
- func MulHalfPositiveWithOverflow(a, b int64) (r int64, ok bool)
- func Sub32WithOverflow(a, b int32) (r int32, ok bool)
- func Sub32to64WithOverflow(a int32, b int64) (r int32, ok bool)
- func SubWithOverflow(a, b int64) (r int64, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add32WithOverflow ¶
Add32WithOverflow returns a+b. If ok is false, a+b overflowed.
func Add32to64WithOverflow ¶
Add32to64WithOverflow returns a+b. If ok is false, b was outside the int32 range or a+b overflowed.
func AddWithOverflow ¶
AddWithOverflow returns a+b. If ok is false, a+b overflowed.
func MulHalfPositiveWithOverflow ¶
MulHalfPositiveWithOverflow returns a*b. b must be positive. If ok is false, a*b overflowed.
func Sub32WithOverflow ¶
Sub32WithOverflow returns a-b. If ok is false, a-b overflowed.
func Sub32to64WithOverflow ¶
Sub32to64WithOverflow returns a-b. If ok is false, b was outside the int32 range or a-b overflowed.
func SubWithOverflow ¶
SubWithOverflow returns a-b. If ok is false, a-b overflowed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.