DEFINITION BigIntegers;

IMPORT
  BT := BasicTypes;

TYPE
  BigInteger = POINTER TO BigIntegerDesc;
  BigIntegerDesc = RECORD (BT.RINGDesc) 
    negative : BOOLEAN;
    digits : POINTER TO ARRAY OF INTEGER;
    PROCEDURE (a:BigInteger) Compare(b: BT.COMPAREABLE): LONGINT;
    PROCEDURE (m:BigInteger) Add(n: BT.GROUP): BT.GROUP;
    PROCEDURE (m:BigInteger) Neg(): BT.GROUP;
    PROCEDURE (m:BigInteger) Norm(): LONGREAL;
    PROCEDURE (m:BigInteger) Mul(n: BT.RING): BT.RING;
    PROCEDURE (n:BigInteger) ConvertToString(): BT.DynString;
  END;

CONST
  MaxDigit = 1000;

PROCEDURE Create(init: LONGINT): BigInteger;

END BigIntegers.

