diff options
author | Hugo van der Sanden <hv@crypt.org> | 2001-06-03 05:26:36 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-03 15:12:13 +0000 |
commit | 58a9a5d5decdad14b14ae7eccc5dfaa8de6eddd9 (patch) | |
tree | ffdcf7f174504129f1af2148240288e31ce814ea /handy.h | |
parent | b11416c6dfc6192b454746d4bf2a583723270bde (diff) | |
download | perl-58a9a5d5decdad14b14ae7eccc5dfaa8de6eddd9.tar.gz |
Re: 'decimal digits' macro?
Message-Id: <200106030326.EAA18786@crypt.compulink.co.uk>
p4raw-id: //depot/perl@10397
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 */ |