Documentation

Overview

    Package uint128 provides a basic unsigned 128 bit integer implementation.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Add

    func Add(a, b *Uint128)

      Add sets `a` to the full 128 bit result of `a + b`.

      func Add64

      func Add64(a *Uint128, b uint64)

        Add64 sets `a` to the full 128 bit result of `a + b`.

        func Hi

        func Hi(a *Uint128) uint64

          Hi returns the high 64 bits of `a`.

          func Lo

          func Lo(a *Uint128) uint64

            Lo returns the low 64 bits of `a`.

            func Mul64x64

            func Mul64x64(out *Uint128, a, b uint64)

              Mul sets `out` to the full 128 bit result of `a * b`.

              func Shl

              func Shl(a *Uint128, shift uint64) uint64

                Shl returns the high 64 bits of `a << shift`.

                func Shr

                func Shr(a *Uint128, shift uint64) uint64

                  Shr returns the low 64 bits of `a >> shift`.

                  Types

                  type Uint128

                  type Uint128 struct {
                  	// contains filtered or unexported fields
                  }

                    Uint128 is an unsigned 128 bit integer represented as 2 uint64 limbs.

                    Source Files