Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use bit_length to determine encoding of the integer
Previous implementation was wrong, not only the binary representaiton could start with `0b` instead of `-0b`, but also int type on 64 bit machines will be 64 bit long. Additionally, I don't think that encoding long integers as strings is a good idea. Let's throw an error instead and let the programmer deal with this.
- Loading branch information
Showing
2 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters