mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 03:26:18 +00:00
factor: enable a debug_assert! statement
This commit is contained in:
parent
4dba45d1da
commit
4da633b835
1 changed files with 5 additions and 8 deletions
|
@ -31,14 +31,11 @@ pub(crate) trait Arithmetic: Copy + Sized {
|
||||||
|
|
||||||
// Check that r (reduced back to the usual representation) equals
|
// Check that r (reduced back to the usual representation) equals
|
||||||
// a^b % n, unless the latter computation overflows
|
// a^b % n, unless the latter computation overflows
|
||||||
// Temporarily commented-out, as there u64::checked_pow is not available
|
debug_assert!(self
|
||||||
// on the minimum supported Rust version, nor is an appropriate method
|
.to_u64(_a)
|
||||||
// for compiling the check conditionally.
|
.checked_pow(_b as u32)
|
||||||
//debug_assert!(self
|
.map(|r| r % self.modulus() == self.to_u64(result))
|
||||||
// .to_u64(_a)
|
.unwrap_or(true));
|
||||||
// .checked_pow(_b as u32)
|
|
||||||
// .map(|r| r % self.modulus() == self.to_u64(result))
|
|
||||||
// .unwrap_or(true));
|
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue