> The C structure that represents a bigint is: > > struct bigint { > void *num_buffer; > UV length; > IV exponent; > UV flags; > } > [snip] > The C<num_buffer> pointer points to the buffer holding the actual > number, C<length> is the length of the buffer, C<exponent> is the base > 10 exponent for the number (so 2e4532 doesn't take up much space), and > C<flags> are some flags for the bigint. Err... what representation is enivsaged for bigints? I had assumed it would be (length*8)-bit 2's complement, but the the later bit about base-10 exponents and digits made me wonder if you were actually intending a string (or BCD) represenation? In either case, the PDD needs to make it clear. (And if the latter, then permission to say "yuk!") bignum perhaps also needs some clarification. Dave.
- Re: PDD 4: Internal data types Dan Sugalski
- Re: PDD 4: Internal data types Hong Zhang
- Re: PDD 4: Internal data types Dan Sugalski
- Re: PDD 4: Internal data types Hong Zhang
- Re: PDD 4: Internal data types Dan Sugalski
- Re: PDD 4: Internal data types Paolo Molaro
- Re: PDD 4: Internal data types Simon Cozens
- Re: PDD 4: Internal data types Hong Zhang
- Re: PDD 4: Internal data types Buddha Buck
- Re: PDD 4: Internal data types Simon Cozens
- Re: PDD 4: Internal data types David Mitchell
- Re: PDD 4: Internal data types Dan Sugalski
- Re: PDD 4: Internal data types Nicholas Clark
- Re: PDD 4: Internal data types Dan Sugalski
- Re: PDD 4: Internal data types Nicholas Clark
- Re: PDD 4: Internal data types Dan Sugalski
- Re: PDD 4: Internal data types Hong Zhang
- Re: PDD 4: Internal data types Dan Sugalski
- Re: PDD 4: Internal data types Hong Zhang
- Re: PDD 4: Internal data types Nicholas Clark
- Re: PDD 4: Internal data types Dan Sugalski