exact

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOverflow     error = overflowError{}
	ErrZeroDivision error = zeroDivisionError{}
)

Functions

func Add

func Add(x, y int64) (result int64, err error)

func DivFloor

func DivFloor(x, y int64) (result int64, mod int64, err error)

func DivTrunc

func DivTrunc(x, y int64) (result int64, mod int64, err error)

func Mul

func Mul(x, y int64) (result int64, err error)

func NewOverflowError

func NewOverflowError(operator Operator, left, right int64) error

func NewZeroDivisionError

func NewZeroDivisionError(numerator, denominator int64) error

func Sub

func Sub(x, y int64) (result int64, err error)

Types

type Operator

type Operator string
const (
	OperatorUnspecified Operator = ""
	OperatorAdd         Operator = "Add"
	OperatorSub         Operator = "Sub"
	OperatorMul         Operator = "Mul"
	OperatorDivFloor    Operator = "DivFloor"
)

Jump to

Keyboard shortcuts

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