doc: Minor fixes in safegcd_implementation.md #1010

pull robot-dreams wants to merge 1 commits into bitcoin-core:master from robot-dreams:safegcd_doc changing 1 files +10 −4
  1. robot-dreams commented at 4:51 AM on November 10, 2021: contributor

    No description provided.

  2. real-or-random requested review from sipa on Nov 10, 2021
  3. in doc/safegcd_implementation.md:579 in 51b8679560 outdated
     575 | @@ -576,7 +576,7 @@ i = N # divsteps left to do
     576 |  while True:
     577 |      # Get rid of all bottom zeros at once. In the first iteration, g may be odd and the following
     578 |      # lines have no effect (until "if eta < 0").
     579 | -    zeros = min(i, count_trailing_zeros(g))
     580 | +    zeros = i if g == 0 else min(i, count_trailing_zeros(g))
    


    sipa commented at 8:47 PM on November 15, 2021:

    Hmm, it feels like this is mostly due to count_trailing_zeros giving the unintuitive -1 as result when fed 0.

    Maybe we should have count_trailing_zeros return N on 0?


    robot-dreams commented at 9:45 PM on November 15, 2021:

    Yeah, that's much more clear!

  4. robot-dreams force-pushed on Nov 15, 2021
  5. in doc/safegcd_implementation.md:572 in 6a14241802 outdated
     569 | @@ -570,7 +570,10 @@ bits efficiently, which is possible on most platforms; it is abstracted here as
     570 |  ```python
     571 |  def count_trailing_zeros(v):
     572 |      """For a non-zero value v, find z such that v=(d<<z) for some odd d."""
    


    sipa commented at 10:04 PM on November 15, 2021:

    The comment would need to be updated.

  6. doc: Minor fixes in safegcd_implementation.md dc9b6853b7
  7. robot-dreams force-pushed on Nov 16, 2021
  8. real-or-random approved
  9. sipa commented at 7:33 PM on November 16, 2021: contributor

    ACK dc9b6853b72b9a492cad230623670e89157525ca

  10. real-or-random merged this on Nov 17, 2021
  11. real-or-random closed this on Nov 17, 2021

  12. robot-dreams deleted the branch on Nov 17, 2021
  13. sipa referenced this in commit d057eae556 on Dec 2, 2021
  14. sipa cross-referenced this on Dec 2, 2021 from issue Update libsecp256k1 subtree to current master by sipa
  15. fanquake referenced this in commit c4a1e09a8c on Dec 3, 2021
  16. sipa referenced this in commit 86dbc4d075 on Dec 15, 2021
  17. jonasnick cross-referenced this on Jan 2, 2022 from issue Sync Upstream by jonasnick
  18. real-or-random referenced this in commit 21e2d65b79 on Jan 5, 2022
  19. gwillen referenced this in commit 35d6112a72 on May 25, 2022
  20. janus referenced this in commit 879a9a27b9 on Jul 10, 2022
  21. patricklodder referenced this in commit 21badcf9d2 on Jul 25, 2022
  22. patricklodder referenced this in commit 03002a9013 on Jul 28, 2022
  23. backpacker69 referenced this in commit 77186f4a04 on Jan 18, 2023
  24. str4d referenced this in commit 6de4698bf9 on Apr 21, 2023
  25. vmta referenced this in commit e1120c94a1 on Jun 4, 2023
  26. vmta referenced this in commit 8f03457eed on Jul 1, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me