safemath

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInt

func AddInt(a, b int) (int, error)

AddInt returns a+b unless either operand is negative or the result would overflow int.

func MultiplyInt

func MultiplyInt(a, b int) (int, error)

MultiplyInt returns a*b unless either operand is negative or the result would overflow int.

func MultiplyInt64

func MultiplyInt64(a, b int64) (int64, error)

MultiplyInt64 returns a*b unless either operand is negative or the result would overflow int64.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL