14 Nov 2000 ahosey   » (Journeyer)

Assume 8-bit bytes and strings composed of 1 byte per character. For an unsigned integer stored in n bytes prove:

(a) 3n bytes will always provide enough space to hold the decimal string representation of the integer.

(b) 3 is the smallest coefficient to provide enough storage for all values of n.

I know this to be true but proving (a) is harder than I thought.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!