Robbepop / apint

Arbitrary precision integers library.
Other
27 stars 4 forks source link

Fix bug that ApInt::sign_bit only works for bit widths of multiples of 64. #9

Closed Robbepop closed 6 years ago

Robbepop commented 6 years ago

ApInt::sign_bit always returns the most significant bit of the most significant digit of the ApInt which is wrong since Digit does not know about the bit width of an ApInt and thus this calculation only works for bit widths that are multiples of the exact Digit bit width which is 64. ApInt::most_significant_bit has the same error.

Robbepop commented 6 years ago

Fixed in commit fcedb3ffeaddc3b2850066eb7dc31437006c4001.