On Fri, Feb 22, 2002 at 03:08:58AM +0000, Alex Gough wrote:
> =item Division
> 
> Under integer conditions, division is halted once the first fractional
> digit is calculated, with the result then being rounded to an integer
> and returned.                                   ^^^^^^^^^^^^^^^^^^^^^

Would it be good to say exactly what type of rounding this is?  What
is 19 / 5?  How about 19 / -5?  FWIW, here's what Perl currently thinks:

  19 / 5 =  3
(-19)/ 5 = -3
  19 /-5 = -3
(-19)/-5 =  3

> =head2 Big number representation
> 
> A big number is represented by the following structure, this is
> capable of being allocated, tracked and destroyed by the parrot
> garbage collection system.
> 
>  typedef struct {
>      BN_NIB* buffer;   /* string of nibbles */
>      UINTVAL nibs;     /* nibs allocated, in sizeof(BN_NIB) */
>      UINTVAL flags;    /* May store, say +Inf */
>      INTVAL digits;    /* digits used */
>      int sign;         /* sign of number, 0=> positive, zero, 1 => negative */
>      INTVAL expn;      /* exponent of number */
       ^^^^^^

This a normal Parrot integer, right?  If so, does it mean our exponents
cannot be bigger than MAXINT?  If so, do we care?  (I looked at the URL
you gave, and noticed that their arbitrary precision library has an
exponent size limit).

I guess it would be difficult to allow the exponent to be a big int,
and still have a fast library?

-- 
David

Reply via email to