mirror of
https://github.com/uutils/num-prime.git
synced 2026-06-10 16:12:35 -07:00
don't use n.is_multiple_of yet
This commit is contained in:
+1
-1
@@ -156,7 +156,7 @@ impl ExactRoots for BigUint {
|
||||
impl ExactRoots for BigInt {
|
||||
fn nth_root_exact(&self, n: u32) -> Option<Self> {
|
||||
// For even roots of negative numbers, return None instead of panicking
|
||||
if self.is_negative() && n.is_multiple_of(2) {
|
||||
if self.is_negative() && n % 2 == 0 {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user