Metadata-Version: 2.1
Name: gint
Version: 0.2.0
Summary: A Python class for polynomial arithmetic over GF(2), based on Pythons built-in integers, efficiently implemented in C
Home-page: https://github.com/enok71/gint
Author: Oskar Enoksson
Author-email: enok@lysator.liu.se
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/enok71/gint/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: tests
Requires-Dist: pytest ; extra == 'tests'

# gint
A Python class for (large) polynomials over GF(2), based on Python's built-in integers, efficiently implemented in C

The purpose of this package is to support polynomial algebra over GF(2). The
polynomial ring is infinite, operations are NOT computed modulo anything.

This package does not depend on numpy nor any other package, instead Pythons
built-in variable-sized integers are used. A Python subclass `gint` is derived
from the built-in `int` where the appropriate 
operators +, -, \*, /, %, divmod are defined. Exponentiation with standard
integer exponent using ** operator is also allowed. Boolean operators &, |, ^
are supported, even mixed with integers (returning gint). Shift operators with
integer shift are allowed. 

Machine instructions for multiplication of GF(2) polynomials are
supported for some CPU models through different assembler variants of core functions.

There is a performance penalty due to the Python integer design being based
on 15- or 30-bit chunks. However even the generic implementation performs
far better than any pure Python implementation, especially for large polynomials.


