Fix to_canonical_u64

This commit is contained in:
Daniel Lubarov 2021-04-02 18:23:22 -07:00
parent 285ec16599
commit 572a55ed29

View File

@ -138,7 +138,11 @@ impl Field for CrandallField {
#[inline]
fn to_canonical_u64(&self) -> u64 {
self.0
let mut c = self.0;
while c >= Self::ORDER {
c -= Self::ORDER;
}
c
}
#[inline]