Pure Python implementation of DJB's Batch GCD algorithm
Project description
Batch GCD
Overview
A pure Python implementation of DJB's Batch GCD algorithm.
Installation
Install with make install
(standard) or make install_dev
(editable).
Or, download and install with pip
by pointing it at this repository.
Usage
This is a library and cannot be invoked directly.
Test with make test
.
The batch_gcd
module exposes a batch_gcd
function which takes integers and returns a list of their GCDs at the corresponding index.
This calculation involves two intermediate steps: creating a product tree and creating a remainder tree.
These functions are also exposed, as products
and remainders
.
products
take integers and returns a product tree, remainders
takes an integer and a product tree.
Resources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for batch_gcd-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78110cb93a83f45785e9b97a5611300644d658aa5932f2df66b4489e8e08702b |
|
MD5 | a520b4982fbd24a01800b668535d3475 |
|
BLAKE2b-256 | 1dabfa8b7a929471de513b5276621aee4eaf81572d09c60a4ae136225175fb4e |