Documentation ¶
Index ¶
- Variables
- func AddBigFloat(op1, op2 *big.Float) (result *big.Float, err error)
- func AddInt32(a, b int32) int32
- func AddInt32WithErr(a, b int32) (int32, error)
- func AddUint64(a, b uint64) uint64
- func AddUint64WithErr(a, b uint64) (uint64, error)
- func MulBigFloat(op1, op2 *big.Float) (result *big.Float, err error)
- func MulUint64(a, b uint64) uint64
- func MulUint64WithErr(a, b uint64) (uint64, error)
- func NewOverflowHandler() *overflowHandler
- func NewSeedRandReader(seed []byte) *seedRandReader
- func QuoBigFloat(op1, op2 *big.Float) (result *big.Float, err error)
- func SqrtBigFloat(op *big.Float) (result *big.Float, err error)
- func SubBigFloat(op1, op2 *big.Float) (result *big.Float, err error)
- func SubInt(a, b int) int
- func SubUint64(a, b uint64) uint64
- type RandomnessGenerator
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 ErrBigFloatAdd = errors.New("this big Float operation is not permitted while doing float.Add")
ErrBigFloatAdd is raised when add of floats produces a panic
var ErrBigFloatMul = errors.New("this big Float operation is not permitted while doing float.Mul")
ErrBigFloatMul is raised when mul of floats produces a panic
var ErrBigFloatQuo = errors.New("this big Float operation is not permitted while doing float.Quo")
ErrBigFloatQuo is raised when quo of floats produces a panic
var ErrBigFloatSqrt = errors.New("this big Float operation is not permitted while doing float.Sqrt")
ErrBigFloatSqrt is raised when sqrt of floats produces a panic
var ErrBigFloatSub = errors.New("this big Float operation is not permitted while doing float.Sub")
ErrBigFloatSub is raised when sub of floats produces a panic
var ErrMultiplicationOverflow = errors.New("multiplication overflow")
ErrMultiplicationOverflow is raised when there is an overflow because of the multiplication of two numbers
Functions ¶
func AddBigFloat ¶
AddBigFloat addition implementation with error handling for big float
func AddInt32WithErr ¶ added in v1.5.6
AddInt32WithErr performs addition on int32 and returns an error if the addition overflows
func AddUint64WithErr ¶
AddUint64WithErr performs addition on uint64 and returns an error if the addition overflows
func MulBigFloat ¶
MulBigFloat multiplication implementation with error handling for big float
func MulUint64 ¶
MulUint64 performs multiplication on uint64 and logs an error if the multiplication overflows
func MulUint64WithErr ¶
MulUint64WithErr performs multiplication on uint64 and returns an error if the multiplication overflows
func NewOverflowHandler ¶ added in v1.5.6
func NewOverflowHandler() *overflowHandler
NewOverflowHandler creates a new instance of type overflowHandler This struct is not concurrent safe and should be instantiated for each chain of operations required to be executed
func NewSeedRandReader ¶
func NewSeedRandReader(seed []byte) *seedRandReader
NewSeedRandReader creates and returns a new SeedRandReader
func QuoBigFloat ¶
QuoBigFloat quotient implementation with error handling for big float
func SqrtBigFloat ¶
SqrtBigFloat sqrt implementation with error handling for big float
func SubBigFloat ¶
SubBigFloat subtraction implementation with error handling for big float