arith

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add32WithOverflow

func Add32WithOverflow(a, b int32) (r int32, ok bool)

Add32WithOverflow returns a+b. If ok is false, a+b overflowed.

func Add32to64WithOverflow

func Add32to64WithOverflow(a int32, b int64) (r int32, ok bool)

Add32to64WithOverflow returns a+b. If ok is false, b was outside the int32 range or a+b overflowed.

func AddWithOverflow

func AddWithOverflow(a, b int64) (r int64, ok bool)

AddWithOverflow returns a+b. If ok is false, a+b overflowed.

func MulHalfPositiveWithOverflow

func MulHalfPositiveWithOverflow(a, b int64) (r int64, ok bool)

MulHalfPositiveWithOverflow returns a*b. b must be positive. If ok is false, a*b overflowed.

func Sub32WithOverflow

func Sub32WithOverflow(a, b int32) (r int32, ok bool)

Sub32WithOverflow returns a-b. If ok is false, a-b overflowed.

func Sub32to64WithOverflow

func Sub32to64WithOverflow(a int32, b int64) (r int32, ok bool)

Sub32to64WithOverflow returns a-b. If ok is false, b was outside the int32 range or a-b overflowed.

func SubWithOverflow

func SubWithOverflow(a, b int64) (r int64, ok bool)

SubWithOverflow returns a-b. If ok is false, a-b overflowed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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