Skip to content
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

fix(inclusion): fix integer overflow+inefficient Round*PowerOfTwo #118

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Oct 17, 2024

  1. fix(inclusion): fix endless loop from integer overflow+inefficient Ro…

    …und*PowerOfTwo
    
    This code fixes an integer flow using finer bit twiddling
    and even makes it much more efficient to always run
    deterministically in O(1) time essentially and not O(k) where
    k=log2(input) due to the prior k iterations that then caused
    the overflow when result became > maxInt.
    
    While here also added some benchmarks and more test cases.
    
    Fixes celestiaorg#117
    odeke-em committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    8d14642 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d3c41e5 View commit details
    Browse the repository at this point in the history