Skip to content

Fix bug with BigInteger.TrailingZeroCount (#77727) #78174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

tannergooding
Copy link
Member

Backport of #77727 to release/7.0. Requested for inclusion in the December servicing release.

Customer Impact

Developers attempting to use TrailingZeroCount with BigInteger will get incorrect results.

This was reported by a community member in #77720

Testing

A unit test was added that validates the raised scenario is correct.

Risk

Low risk. This is a net new API in .NET 7

* Fix bug with BigInteger.TrailingZeroCount

* Update src/libraries/System.Runtime.Numerics/tests/BigIntegerTests.GenericMath.cs

Co-authored-by: Tommi Kekäläinen <[email protected]>

* Update negative code path

* Simplify logic for handling negative values

* Update src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs

Co-authored-by: Tommi Kekäläinen <[email protected]>

* Update comment

Co-authored-by: Tommi Kekäläinen <[email protected]>
@ghost ghost added the area-System.Numerics label Nov 10, 2022
@ghost ghost assigned tannergooding Nov 10, 2022
@ghost
Copy link

ghost commented Nov 10, 2022

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #77727 to release/7.0. Requested for inclusion in the December servicing release.

Customer Impact

Developers attempting to use TrailingZeroCount with BigInteger will get incorrect results.

This was reported by a community member in #77720

Testing

A unit test was added that validates the raised scenario is correct.

Risk

Low risk. This is a net new API in .NET 7

Author: tannergooding
Assignees: tannergooding
Labels:

area-System.Numerics

Milestone: -

@tannergooding tannergooding added Servicing-consider Issue for next servicing release review and removed area-System.Numerics labels Nov 10, 2022
@tannergooding tannergooding added this to the 7.0.x milestone Nov 10, 2022
@ghost
Copy link

ghost commented Nov 10, 2022

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #77727 to release/7.0. Requested for inclusion in the December servicing release.

Customer Impact

Developers attempting to use TrailingZeroCount with BigInteger will get incorrect results.

This was reported by a community member in #77720

Testing

A unit test was added that validates the raised scenario is correct.

Risk

Low risk. This is a net new API in .NET 7

Author: tannergooding
Assignees: tannergooding
Labels:

Servicing-consider, area-System.Numerics

Milestone: 7.0.x

@carlossanlop
Copy link
Contributor

Approved by Tactics and signed-off by area owners.
No OOB package authoring changes needed for the Numerics csproj.
CI failure is known and unrelated: #77988
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 403aa58 into dotnet:release/7.0 Nov 11, 2022
@tannergooding tannergooding deleted the backport-77727 branch November 11, 2022 15:04
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Numerics Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants