don't use n.is_multiple_of yet

This commit is contained in:
Sylvestre Ledru
2026-02-23 09:19:25 +01:00
parent 0eacd225eb
commit f79554bf32
+1 -1
View File
@@ -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;
}