i128

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package i128 implements a 128-bit integer type.

NOTE: This is the start of some code that I wrote down in a few minutes. It is probably wrong and is untested.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int128

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

Int128 represents a 128-bit signed integer.

func (Int128) Add

func (i Int128) Add(j Int128) Int128

Add computes i + j.

func (Int128) And

func (i Int128) And(j Int128) Int128

And computes i & j.

func (Int128) AndNot

func (i Int128) AndNot(j Int128) Int128

AndNot computes i &^ j.

func (Int128) Comp

func (i Int128) Comp() Int128

Comp computes ^i.

func (Int128) Div

func (i Int128) Div(j Int128) Int128

Div computes i / j.

func (Int128) Geq

func (i Int128) Geq(j Int128) bool

Geq computes i >= j.

func (Int128) Gt

func (i Int128) Gt(j Int128) bool

Gt computes i > j.

func (Int128) Leq

func (i Int128) Leq(j Int128) bool

Leq computes i <= j.

func (Int128) Lsh

func (i Int128) Lsh(n uint) Int128

Lsh computes i << n.

func (Int128) Lt

func (i Int128) Lt(j Int128) bool

Lt computes i < j.

func (Int128) Mul

func (i Int128) Mul(j Int128) Int128

Mul computes i * j.

func (Int128) Neg

func (i Int128) Neg() Int128

Neg computes -i.

func (Int128) Or

func (i Int128) Or(j Int128) Int128

Or computes i | j.

func (Int128) Rem

func (i Int128) Rem(j Int128) Int128

Rem computes i % j.

func (Int128) Rsh

func (i Int128) Rsh(n uint) Int128

Rsh computes i >> n.

func (Int128) Xor

func (i Int128) Xor(j Int128) Int128

Xor computes i ^ j.

Jump to

Keyboard shortcuts

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