This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
readelf and % of bits sets
- From: Colin Pitrat <colin dot pitrat at amadeus dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 11 Jan 2011 10:56:42 +0100
- Subject: 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