← 返回首页
math package - internal/runtime/math - Go Packages
  1. Discover Packages
  2. Standard library
  3. internal
  4. runtime
  5. math

math

package standard library
go1.26.5 Latest Latest

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

Go to latest
Published: Jul 7, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0
Main Versions Licenses Imports Imported By

Details

Repository

Links

Jump to ...
Documentation

Documentation

Index

Constants

View Source const ( MaxUint16 = ^uint16(0) MaxUint32 = ^uint32(0) MaxUint64 = ^uint64(0) MaxUintptr = ^uintptr(0) MaxInt64 = int64(MaxUint64 >> 1) )

Variables

This section is empty.

Functions

func Add64

func Add64(x, y, carry uint64) (sum, carryOut uint64)

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

func Mul64(x, y uint64) (hi, lo uint64)

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

func MulUintptr(a, b uintptr) (uintptr, bool)

MulUintptr returns a * b and whether the multiplication overflowed. On supported platforms this is an intrinsic lowered by the compiler.

Types

This section is empty.

Jump to

Close

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
Close
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more.
Okay