--- libecb/ecb.pod 2011/06/17 21:16:12 1.34
+++ libecb/ecb.pod 2011/06/17 21:38:31 1.35
@@ -414,15 +414,36 @@
=item int ecb_ctz32 (uint32_t x)
+=item int ecb_ctz64 (uint64_t x)
+
Returns the index of the least significant bit set in C (or
equivalently the number of bits set to 0 before the least significant bit
-set), starting from 0. If C is 0 the result is undefined. For example:
+set), starting from 0. If C is 0 the result is undefined.
+
+For example:
ecb_ctz32 (3) = 0
ecb_ctz32 (6) = 1
+=item int ecb_ld32 (uint32_t x)
+
+=item int ecb_ld64 (uint64_t x)
+
+Returns the index of the most significant bit set in C, or the number
+of digits the number requires in binary (so that C<< 2**ld <= x <
+2**(ld+1) >>). If C is 0 the result is undefined. A common use case is
+to compute the integer binary logarithm, i.e. C, for
+example to see how many bits a certain number requires to be encoded.
+
+This function is similar to the "count leading zero bits" function, except
+that that one returns how many zero bits are "in front" of the number (in
+the given data type), while C returns how many bits the number
+itself requires.
+
=item int ecb_popcount32 (uint32_t x)
+=item int ecb_popcount64 (uint64_t x)
+
Returns the number of bits set to 1 in C. For example:
ecb_popcount32 (7) = 3