Crate tonelli_shanks[][src]

Expand description

Performs Tonelli–Shanks algorithm.

Example

use acl_modint::ModInt1000000007 as Mint;
use tonelli_shanks::ModIntBaseExt as _;

assert_eq!(Some(82_681_419.into()), Mint::new(42).sqrt());

Traits

ModIntBaseExt

Performs Tonelli–Shanks algorithm.