-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Fix bug with BigInteger.TrailingZeroCount #77727
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
Conversation
Tagging subscribers to this area: @dotnet/area-system-numerics |
This doesn't seem to fix the negative number path that also has the extra increment? Also, the two new tests check the same value. Did you mean |
src/libraries/System.Runtime.Numerics/tests/BigIntegerTests.GenericMath.cs
Outdated
Show resolved
Hide resolved
…nericMath.cs Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com>
Why separate paths for positive and negative numbers in the first place? |
@tfenise Yep, I see what you mean after looking closer at your explanation in the bug report. Thanks for bringing this to our attention! |
Well, it was I who wrote the bug report and noted the unneeded path, but I'm glad @tfenise brought it up again, because I probably wouldn't have had the courage to do so. 🙂 |
src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs
Outdated
Show resolved
Hide resolved
…nteger.cs Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com>
@tkekalainen Sounds like I need more coffee too. Thanks 😄. |
src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs
Outdated
Show resolved
Hide resolved
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3438765946 |
@tannergooding backporting to release/7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix bug with BigInteger.TrailingZeroCount
Applying: Update src/libraries/System.Runtime.Numerics/tests/BigIntegerTests.GenericMath.cs
Applying: Update negative code path
Applying: Simplify logic for handling negative values
Applying: Update src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs
Applying: Update comment
error: sha1 information is lacking or useless (src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0006 Update comment
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@tannergooding an error occurred while backporting to release/7.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
* Fix bug with BigInteger.TrailingZeroCount * Update src/libraries/System.Runtime.Numerics/tests/BigIntegerTests.GenericMath.cs Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com> * 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 <76913562+tkekalainen@users.noreply.github.com> * Update comment Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com>
* Fix bug with BigInteger.TrailingZeroCount * Update src/libraries/System.Runtime.Numerics/tests/BigIntegerTests.GenericMath.cs Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com> * 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 <76913562+tkekalainen@users.noreply.github.com> * Update comment Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com> Co-authored-by: Drew Kersnar <18474647+dakersnar@users.noreply.github.com> Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com>
Fixes #77720