X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=handy.h;h=76cbf2e2162e96207487671a6c27d16e6e4b7291;hb=645c22eff49f10f8bfaa5864a990561e60fea631;hp=99cb5c6e749b13b3540dce7b240cef3a136931ec;hpb=9041c2e396c8c7de7680a2007dc341a9f65be0d0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/handy.h b/handy.h index 99cb5c6..76cbf2e 100644 --- a/handy.h +++ b/handy.h @@ -194,6 +194,7 @@ typedef U64TYPE U64; #endif +/* log(2) is pretty close to 0.30103, just in case anyone is grepping for it */ #define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log2(10) =~ 146/485 */ #define TYPE_DIGITS(T) BIT_DIGITS(sizeof(T) * 8) #define TYPE_CHARS(T) (TYPE_DIGITS(T) + 2) /* sign, NUL */