diff --git a/PerfectNumbers.Core/BigIntegerNumbers.cs b/PerfectNumbers.Core/BigIntegerNumbers.cs new file mode 100644 index 0000000..984a918 --- /dev/null +++ b/PerfectNumbers.Core/BigIntegerNumbers.cs @@ -0,0 +1,15 @@ +using System.Numerics; + +namespace PerfectNumbers.Core +{ + public static class BigIntegerNumbers + { + public static readonly BigInteger OneShiftedLeft63 = BigInteger.One << 63; + public static readonly BigInteger OneShiftedLeft256MinusOne = (BigInteger.One << 256) - BigInteger.One; + public static readonly BigInteger Two = (BigInteger)2; + public static readonly BigInteger UlongMaxValue = (BigInteger)ulong.MaxValue; + public static readonly BigInteger UlongMaxValuePlusOne = UlongMaxValue + BigInteger.One; + public static readonly BigInteger UInt128MaxValue = (BigInteger)UInt128.MaxValue; + public static readonly BigInteger UInt128MaxValuePlusOne = UInt128MaxValue + BigInteger.One; + } +} \ No newline at end of file diff --git a/PerfectNumbers.Core/UInt128Numbers.cs b/PerfectNumbers.Core/UInt128Numbers.cs index f94a331..eae2c50 100644 --- a/PerfectNumbers.Core/UInt128Numbers.cs +++ b/PerfectNumbers.Core/UInt128Numbers.cs @@ -7,10 +7,11 @@ namespace PerfectNumbers.Core public static readonly UInt128 Two = 2UL; public static readonly UInt128 Three = 3UL; public static readonly UInt128 Four = 4UL; - public static readonly UInt128 SixtyFour = 64UL; + public static readonly UInt128 MaxValueMinusOne = UInt128.MaxValue - UInt128.One; public static readonly UInt128 OneHundredTwentySeven = 127UL; public static readonly UInt128 OneShiftedLeft64 = UInt128.One << 64; public static readonly UInt128 OneShiftedLeft64x2 = Two * OneShiftedLeft64; + public static readonly UInt128 SixtyFour = 64UL; public static readonly GpuUInt128 TwoGpu = new(2UL);