package
Version:
v0.0.0-...-f418d51
Opens a new window with list of versions in this module.
Published: May 4, 2018
License: BSD-3-Clause
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package checked implements basic checked arithmetic.
-
func Add(x, y uint64) (sum uint64, ok bool)
-
func Mul(x, y uint64) (prod uint64, ok bool)
-
func MulBigPow10(z, x *big.Int, n uint64) *big.Int
-
func MulPow10(x uint64, n uint64) (uint64, bool)
-
func Sub(x, y uint64) (diff uint64, ok bool)
Add returns x + y and a bool indicating whether the addition was successful.
MulBigPow10 sets z to x * 10**n and returns z.
MulPow10 computes x * 10**n and a bool indicating whether the multiplcation
was successful.
Sub returns x - y and a bool indicating whether the subtraction was successful.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.