[][src]Crate bulk_gcd

bulk-gcd

This crate computes GCD of each integer in moduli list with the product of all integers in the same list using fast algorithm by D. Bernstein.

See: this paper for more details and motivation.

Usage example:

extern crate bulk_gcd;
extern crate rug;

use rug::Integer;

let moduli = [
    Integer::from(15),
    Integer::from(35),
    Integer::from(23),
];

let result = bulk_gcd::compute(&moduli).unwrap();

assert_eq!(
    result,
    vec![
        Some(Integer::from(5)),
        Some(Integer::from(5)),
        None,
    ]
);

Enums

ComputeError

Possible computation errors

Functions

compute

Compute GCD of each integer in the moduli with all other integers in it.

Type Definitions

ComputeResult