-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.Numericsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedregression-from-last-release
Milestone
Description
Description
BigInteger produces incorrect results in .NET 9, while this doesn't repro with .NET 8 or earlier.
Reproduction Steps
Console.WriteLine(new BigInteger(-4294967296) & new BigInteger(-1919810));
Console.WriteLine(new BigInteger(-4042322161) & new BigInteger(-252645136));
Console.WriteLine(new BigInteger(-8589934592) | new BigInteger(-21474836480));
Console.WriteLine(BigInteger.Parse("-4294967296") & BigInteger.Parse("-1919810"));
Console.WriteLine(BigInteger.Parse("-4042322161") & BigInteger.Parse("-252645136"));
Console.WriteLine(BigInteger.Parse("-8589934592") | BigInteger.Parse("-21474836480"));
Expected behavior
-4294967296
-4294967296
-4294967296
-4294967296
-4294967296
-4294967296
Actual behavior
0
0
0
0
0
0
Regression?
Yes
Known Workarounds
No
Configuration
.NET 9 rc2
Other information
No response
Metadata
Metadata
Assignees
Labels
area-System.Numericsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedregression-from-last-release