BitContradiction improvements.
This commit is contained in:
1 parent
b453d46c5f
commit
22cc8f368f
7 files changed
+5299
-4230
No files matched your search
@@ -70,6 +70,7 @@ namespace PerfectNumbers.Core
|
||||
61 => BigIntegerNumbers.Pow2Exact61,
|
||||
62 => BigIntegerNumbers.Pow2Exact62,
|
||||
63 => BigIntegerNumbers.Pow2Exact63,
|
||||
_ when i >= 0 => System.Numerics.BigInteger.One << i,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(i), $"Parameter value {i} is incorrect"),
|
||||
};
|
||||
|
||||
@@ -140,7 +141,8 @@ namespace PerfectNumbers.Core
|
||||
62 => BigIntegerNumbers.Pow2MinusOne62,
|
||||
63 => BigIntegerNumbers.Pow2MinusOne63,
|
||||
1024 => BigIntegerNumbers.Pow2MinusOne1024,
|
||||
_ when i >= 0 => (System.Numerics.BigInteger.One << i) - System.Numerics.BigInteger.One,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(i), $"Parameter value {i} is incorrect"),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user