I follow discussions on the Algorithms community on orkut. Came across one question which asked us to implement very big integers in C/C++. We can calculate 12! using integer data type, 20! using long long. Java provides a data type BigInteger which can handle it, Python can handle REALLY LARGE VALUES. In C/C++ we can implement this with the help of an integer array where each digit is represented as an element of the array. I have used a class for this purpose.
Here's my implementation of a large number in C++..
Hey thanks for the code... :) One doubt..Why are you using a matrix of size 2*size+1 X 2*size in your operator * function??? HERE in this line of your code: int mat[2*SIZE+1][2*SIZE]={0};I thought mat[2*size][size] was enough.... Is it necessary to have it?
Heard of Discrete Fourier Transform?
Hi Avi,
I have heard of DFT, but never thought about it when I wrote this 3 years back.
Thanks