package math
import "internal/runtime/math"
Index ¶
- Constants
- func Add64(x, y, carry uint64) (sum, carryOut uint64)
- func Mul64(x, y uint64) (hi, lo uint64)
- func MulUintptr(a, b uintptr) (uintptr, bool)
Constants ¶
const MaxUintptr = ^uintptr(0)
Functions ¶
func Add64 ¶
Add64 returns the sum with carry of x, y and carry: sum = x + y + carry. The carry input must be 0 or 1; otherwise the behavior is undefined. The carryOut output is guaranteed to be 0 or 1.
This function's execution time does not depend on the inputs. On supported platforms this is an intrinsic lowered by the compiler.
func Mul64 ¶
Mul64 returns the 128-bit product of x and y: (hi, lo) = x * y with the product bits' upper half returned in hi and the lower half returned in lo. This is a copy from math/bits.Mul64 On supported platforms this is an intrinsic lowered by the compiler.
func MulUintptr ¶
MulUintptr returns a * b and whether the multiplication overflowed. On supported platforms this is an intrinsic lowered by the compiler.
Source Files ¶
- Version
- v1.24.0 (latest)
- Published
- Feb 10, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 27 minutes ago –
Tools for package owners.