summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-11-09 18:26:43 -0700
committerKarl Williamson <khw@cpan.org>2017-11-09 18:51:59 -0700
commit464decb62c023e46cc194963698a26d39b491f4d (patch)
tree628ad5512f20373f9d46663e0c198e4191f012d6 /handy.h
parent43cb665150ddf892c277cba7edc80937fa053fb1 (diff)
downloadperl-464decb62c023e46cc194963698a26d39b491f4d.tar.gz
handy.h: Clarify comment
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/handy.h b/handy.h
index 53477994a3..f75c900656 100644
--- a/handy.h
+++ b/handy.h
@@ -260,8 +260,9 @@ 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 */
+/* log(2) (i.e., log base 10 of 2) is pretty close to 0.30103, just in case
+ * anyone is grepping for it */
+#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log10(2) =~ 146/485 */
#define TYPE_DIGITS(T) BIT_DIGITS(sizeof(T) * 8)
#define TYPE_CHARS(T) (TYPE_DIGITS(T) + 2) /* sign, NUL */