gf2

package
v0.0.0-...-a776223 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Poly64

type Poly64 uint64

A Poly64 is a polynomial over GF(2) mod x^64.

func (Poly64) Div

func (p Poly64) Div(p2 Poly64) (q, r Poly64)

Div performs Euclidean division using p and p2 (if non-zero) and returns the resulting quotient and remainder. That is, it returns q and r such that q.Times(p2).Plus(r) == p and either r == 0 or floor(log2(r)) < floor(log2(p2)). It panics if p2 == 0.

func (Poly64) Minus

func (p Poly64) Minus(q Poly64) Poly64

Minus returns the difference of p and q as polynomials over GF(2), which is just the bitwise xor of the two.

func (Poly64) Plus

func (p Poly64) Plus(q Poly64) Poly64

Plus returns the sum of p and q as polynomials over GF(2), which is just the bitwise xor of the two.

func (Poly64) Times

func (p Poly64) Times(q Poly64) Poly64

Times returns the product of p and q as polynomials over GF(2), mod x^64.

Jump to

Keyboard shortcuts

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