cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/27/04:27:25

Message-ID: <000d01bdd194$41ca8bc0$8e70e7c1@gonzo>
From: "Catalin Carstoiu" <cata AT intergorj DOT ro>
To: <djgpp AT delorie DOT com>
Subject: Re: LARGE numbers.
Date: Thu, 27 Aug 1998 11:25:30 +0300
MIME-Version: 1.0

>oops...
>I meant 25834242042 with 11 digits.  I cant figure out how to store it. :(
>

you can store it into an array. Let's say on a[0] its the length of the
number, and then follows the number in reversed order (for a easier
implementation of operations (+,-,* etc).

So, for your number, the declaration would be:
int a[]={11,2,4,0,2,4,2,4,3,8,5,2};

the operations are simulated exactcly as you do them on paper... like in old
school days... (of course there are some optimizations :) )



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019