Robbepop / apint

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

Implement utility functions count_{zeros|ones}, {leading|trailing}_zeros #11

Closed Robbepop closed 6 years ago

Robbepop commented 6 years ago

In Rust all primitive types have methods count_zeros, count_ones, leading_zeros and trailing_zeros. So create better parity with ApInt we should implement those small utility functions. This also helps for implementing higher level data structures later on, such as SignedApInt etc.

This issue proposes the addition of the following methods

Open Questions

Robbepop commented 6 years ago

Implementation finalized with commit 808d12da63263d50b0243dd6e6dacde3d1d88d78.