At 07:17 PM 3/2/2001 +0000, Nicholas Clark wrote:
>On Fri, Mar 02, 2001 at 01:40:40PM -0500, Dan Sugalski wrote:
> > At 01:36 PM 3/2/2001 -0500, Andy Dougherty wrote:
>
> > >Do you also want an unsigned variant? (trying to spare Nick some of
> > >the sign preservation madness he's currently battling in perl5.)
> >
> > Well, we've got an unsigned version of the native type, but I don't see
> > much point in one for the bigint--one bit in a fixed 32 (or 16, or 64)
> > makes a difference, but one bit in some variable-length integer doesn't
> > seem to be really worth the extra trouble.
>
>an unsigned type large enough to hold all possible signed or unsigned values
>without loss of bits is the only sane (possible/portable?) way of doing
>some things.
Yup. I'm not sure how the PL_INT typedef should be implemented--part of
me's thinking just make it a union, but that makes it a pain to use in some
ways.
>By which I mean that if (say) IV is 36 bits, but BIG_NUM is 72
>[I understand that there's a PDP port of current gcc underway]
One needs to specify *which* PDP is the target. The PDP-11 was the most
popular of the bunch, and it's a 16-bit machine. One of the TOPS machines
was 36 bit, IIRC, with either 7 or 9 bit chars. (Can't remember which)
>at some
>points it becomes necessary to have an unsigned type for "the largest
>integer" which in this case would be 72 bits.
>[and on a machine with nothing larger than 32 will be 32]
Sure. The size of an INT will probably be either 32 or 64 bits, depending
both on the size of an IV and the size of a pointer for the target machine.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk