nim-lang / bigints

BigInts for Nim
MIT License
124 stars 32 forks source link

Fix & optimize `toString`, `initBigInt` #54

Closed konsumlamm closed 2 years ago

konsumlamm commented 2 years ago

I added all bugs that I found (and more) to the test suite. calcSizes now produces other results (though only for powers of two, so we don't have to use sizes[base] + 1 for those anymore) and is more efficient (due to using multiplication rather than division). initBigInt is now also optimized for bases which are a power of two (similar to toString).

konsumlamm commented 2 years ago

@narimiran ping