Pratyush Mishra
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
4 deletions
-
curve-tests/src/fields.rs
|
|
@ -79,10 +79,10 @@ fn random_inversion_tests(rng: &mut R) { |
|
|
|
|
|
|
|
for _ in 0..ITERATIONS {
|
|
|
|
let mut a = F::rand(rng);
|
|
|
|
let b = a.inverse().unwrap(); // probablistically nonzero
|
|
|
|
a *= &b;
|
|
|
|
|
|
|
|
assert_eq!(a, F::one());
|
|
|
|
let b = a.inverse().map(|b| {
|
|
|
|
a *= &b;
|
|
|
|
assert_eq!(a, F::one());
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|