The following text may help you. It is not mine. The link to the original document is not working anymore, but you may look in Google to find it again.
Check out the Big Integer units: http://home.student.utwente.nl/e.j.molendijk/index.html I will not list the source here, since it is way to big. But a few of the included functions: procedure BIntAdd(Var Dest : TBInt; Src : TBInt); overload; procedure BIntAdd(Var Dest : TBInt; Const Src : Cardinal=1); overload; {================================================================ BIntSub: Dest := Dest - Src; 1. BIntSub makes sure that Dest and Src have the same memory size 2. If the result is negative. A Two's Complement notation is returned. 3. Src can also be an unsigned integer, optimezed routines will be used in this case. Calling BIntAdd without the Src parameter results in Dest := Dest - 1 You can/should call BSub or BDec directly when you are sure that the conditions specified at step 1 are met. } procedure BIntSub(Var Dest : TBInt; Src : TBInt); overload; procedure BIntSub(Var Dest : TBInt; Src : Cardinal=1); overload; {================================================================ BIntMul: Dest := Src1 * Src2; 1. BIntAdd makes sure that Dest can is big enough to hold the result; And that Dest, Src1 and Src2 are all 32 bit alligned. 2. Dest will never overflow You can/should call BMul directly when you are sure that the conditions specified at step 1 are met. } procedure BIntMul(Var Dest : TBInt; Src1, Src2 : TBInt); overload; procedure BIntMul(Var Dest : TBInt; Src1 : TBInt; Src2 : Cardinal); overload; procedure BIntDivMod(x,y : TBInt; Var q,r : TBInt); {================================================================ BIntAbs: A := Abs(A); Returns the absolute value of A } Procedure BIntAbs(Var A : TBInt); {================================================================ BIntCmp: Compare Src1 and Src2. return: Equal, Smaller or Greater. 1. BIntCmp makes sure that Src1 and Src2 are of same size and both 32 bit alligned. You can/should call BCmp directly when you are sure that the conditions specified at step 1 are met. } Function BIntCmp(Src1, Src2 : TBInt) : TBIntEq; overload; Function BIntCmp(Src1 : TBInt; Src2 : Integer) : TBIntEq; overload; {================================================================ BIntCopy: Dest := Src; 1. Makes sure Dest is big enough to hold Src } procedure BIntCopy(Var Dst : TBInt; Const Src : TBInt); {================================================================ BIntSetBit: Dest := Dest or (1 shl b); or BIntGetBit: Result := Bit at position b in A. Sets bit at position b to a one. Bit position b must be withing the memory size of Dest, otherwise it will not be set. 0 <= b < 32*length(Dst) } procedure BIntSetBit(Var a : TBInt; b : Integer); Function BIntGetBit(Var a : TBInt; b : Integer) : Integer; {================================================================ See comment in implementation for more details about the following internal routines } procedure BIntReduce(Var A : TBInt); Procedure BIntBurn(Var A : TBInt); procedure BIntChk(Var A, B : TBInt); Procedure BIntChkIncOverflow(Var A : TBInt); Procedure BIntChkSumOverflow(Var A,B : TBInt); Procedure BIntChkMulOverflow(Var A,B,C : TBInt); Function BIntGetBitLength(BInt : TBInt) : Integer; Procedure BIntSetBitLength(Var BInt : TBInt; Bits : Integer); Function BIntNegative(Const A : TBInt) : Boolean; Chris Stebbing wrote: > Hi All, > > believe it or not, I need an integer bigger than Int64. Int64 is a > signed 64bit integer, and I'm wondering if there's anything bigger > out there... Much bigger. > > I'm going to use a double for the time being to see if I can get away > with using a floating point value, but I'd really like to use the integers. > > Cheers, > Chris. > > > PS. The application is a neural network application and the values > get big real quick. > > _______________________________________________ > Delphi mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi > > _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

