saxbophone / arby

Arbitrary precision arithmetic in C++, even at compile-time
https://saxbophone.com/arby/
Mozilla Public License 2.0
8 stars 1 forks source link

arby::ilog should return tuple of uintmax_t, uintmax_t #143

Closed saxbophone closed 1 year ago

saxbophone commented 1 year ago

Because even with the smallest base of 2, there's no way we're realistically going to overflow uintmax_t with the answer, regardless if it's a 32-bit or 64-bit system. That number of bits is only one eighth of the total number of bytes we could ever hope to address with such a system, and represents a truly astronomical number!

In the interests of efficiency, we will return the result as a pair of native types instead of using arby::Nat for this.

saxbophone commented 1 year ago

Should probably be done in the same branch as #136 Never mind, let's do this one on its own first and get it over with