This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: readelf and % of bits sets


> The formula taken is the following:
> 
> %set = (nbits * 100 + 50) / (nb_bitmask_words * sizeof(bitmask_word) * 8);
> 
> Do you have any hint on why there is this + 50 that corresponds to adding 
> half a bit in the bit set ?

That sounds like rounding up to me.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]