Skip to main content

A Python class for polynomial arithmetic over GF(2), based on Pythons built-in integers, efficiently implemented in C

Project description

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 field is infinite, operations are NOT computed modulo anything.

The 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 with integers (returning gint). Shift operators with integer shift are allowed.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gint-0.2.0.tar.gz (22.8 kB view hashes)

Uploaded Source

Built Distributions

gint-0.2.0-cp36-cp36m-win_amd64.whl (21.0 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

gint-0.2.0-cp36-cp36m-win32.whl (18.0 kB view hashes)

Uploaded CPython 3.6m Windows x86

gint-0.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (61.5 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

gint-0.2.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (46.9 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

gint-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (21.5 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

gint-0.2.0-cp36-abi3-win_amd64.whl (21.1 kB view hashes)

Uploaded CPython 3.6+ Windows x86-64

gint-0.2.0-cp36-abi3-win32.whl (18.1 kB view hashes)

Uploaded CPython 3.6+ Windows x86

gint-0.2.0-cp36-abi3-musllinux_1_1_x86_64.whl (60.9 kB view hashes)

Uploaded CPython 3.6+ musllinux: musl 1.1+ x86-64

gint-0.2.0-cp36-abi3-musllinux_1_1_i686.whl (46.5 kB view hashes)

Uploaded CPython 3.6+ musllinux: musl 1.1+ i686

gint-0.2.0-cp36-abi3-musllinux_1_1_aarch64.whl (66.7 kB view hashes)

Uploaded CPython 3.6+ musllinux: musl 1.1+ ARM64

gint-0.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (56.7 kB view hashes)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ x86-64

gint-0.2.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (62.9 kB view hashes)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ ARM64

gint-0.2.0-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (46.0 kB view hashes)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

gint-0.2.0-cp36-abi3-macosx_10_9_x86_64.whl (21.6 kB view hashes)

Uploaded CPython 3.6+ macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page