quadratic 0.2.0

Computes the Legendre and Jacobi symbols for integers
Documentation

Quadratic

build status crates status

Number theoretic helpers. Calculates the Legendre and Jacobi symbol using the standard algorithm. Since the Jacobi symbol is a generalization of the Legendre symbol, only this function is provided.

Usage

Add quadratic as a dependency in Cargo.toml, then:

extern crate quadratic;

assert_eq!(-1, quadratic::jacobi(2, 5));
assert_eq!(1, quadratic::jacobi(2, 15));

License

MIT-Licensed. See LICENSE file for details.