Expand description
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
Possible computation errors
Functions
Compute GCD of each integer in the
moduli
with all other integers in it.