On Tuesday, October 6, 2015 at 10:59:04 AM UTC-4, Scott Jones wrote: > > I couldn't find anything yet - is there a recommended / fastest way to get > the number of bits in a number (I really only need it for unsigned values). > Thanks >
sizeof(number)*8 if you want all the bits (though you'd need to define a separate method for BigInt), or count_ones(number) if you want the 1 bits.
