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:

```rust extern crate quadratic;

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

License

MIT-Licensed. See LICENSE file for details.