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]

readelf and % of bits sets


Hello,

I was surprised to see in src/readelf.c that how the % of bits sets in the 
Bloom filter bitset is computed.
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 ?

Regards,
Colin
Hello,

I was surprised to see in src/readelf.c that how the % of bits sets in the Bloom filter bitset is computed.
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 ?

Regards,
Colin

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