[release/9.0-staging] Add a missing = in BigInteger.cs by github-actions[bot] · Pull Request #109732 · dotnet/runtime (original) (raw)

Backport of #105456 to release/9.0-staging

/cc @tannergooding @LEI-Hongfaan

Customer Impact

Reported by a customer in #109669. BigInteger may compute an incorrect result when the value produced is a value of the form -(2^(32 * n)) where n >= 1. This is primarily prevalent to bitwise operations such as & (and), | (or), and ^ (xor).

Regression

This is a regression from .NET 8.

Testing

Additional tests covering the edge case were added. The failure was due to a comparison doing > (greater than) rather than >= (greater than or equal to) as the equals sign was accidentally dropped in a refactoring.

Risk

Low.

This fix is itself low risk, resolves the issue, and is understood why it is the correct solution.