From dd9199f0cbcf2b38c3ec96854877ecf356a3be05 Mon Sep 17 00:00:00 2001 From: mdw Date: Sun, 25 Jun 2000 12:58:23 +0000 Subject: [PATCH] Fix the derivation of `depth' commentary. --- mptext.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mptext.c b/mptext.c index f408b90..891e414 100644 --- a/mptext.c +++ b/mptext.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mptext.c,v 1.5 2000/06/17 11:46:19 mdw Exp $ + * $Id: mptext.c,v 1.6 2000/06/25 12:58:23 mdw Exp $ * * Textual representation of multiprecision numbers * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: mptext.c,v $ + * Revision 1.6 2000/06/25 12:58:23 mdw + * Fix the derivation of `depth' commentary. + * * Revision 1.5 2000/06/17 11:46:19 mdw * New and much faster stack-based algorithm for reading integers. Support * reading and writing binary integers in bases between 2 and 256. @@ -64,12 +67,13 @@ * * This is the number of bits in a @size_t@ object. Why? * - * Just to convince yourself that this is correct: let @b = MPW_MAX + 1@. - * Then the largest possible @mp@ is %$M - 1$% where %$M = b^Z$%. Let %$r$% - * be a radix to read or write. Since the recursion squares the radix at - * each step, the highest number reached by the recursion is %$d$%, where: + * To see this, let %$b = \mathit{MPW\_MAX} + 1$% and let %$Z$% be the + * largest @size_t@ value. Then the largest possible @mp@ is %$M - 1$% where + * %$M = b^Z$%. Let %$r$% be a radix to read or write. Since the recursion + * squares the radix at each step, the highest number reached by the + * recursion is %$d$%, where: * - * %$r^(2^d) = b^Z$%. + * %$r^{2^d} = b^Z$%. * * Solving gives that %$d = \lg \log_r b^Z$%. If %$r = 2$%, this is maximum, * so choosing %$d = \lg \lg b^Z = \lg (Z \lg b) = \lg Z + \lg \lg b$%. -- 2.11.0