At 10:49 AM 3/8/2001 -0800, Hong Zhang wrote:
> > I was thinking maybe (length/4)*31-bit 2s complement to make portable
> > overflow detection easier, but that would be only if there wasn't a good C
> > library for this available to snag.
>
>I believe Python uses (length/2)*15-bit 2's complement representation.
Looks like they do operations with 16-bit integers. I'd as soon go with
32-bit ones--wastes a little space, but should be faster. (Except where we
should shift to 64-bit words)
>Because bigint and bitnum are complicated anyway, we should make the
>them transparent and disallow direct field access. Some generic inline
>functions and/or macros must be used to access individual digits.
>The actual data structure should be defined the implementation,
>and is irrelavent to rest of system. We can decide its size if
>we really need.
That's more or less what I'd had in mind. (Though I over-specified) The
fields in the struct were named, but that was intended to be the extent of
things.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk