I have this problem, I am working on a project, in which I work with residue classes of huge exponents to find patterns etc. And well, I wrote the source code for all the fundamental functions like gcd, beklers algorithm etc. Now, when it comes to stuff like

pow(1008,25) int's just don't work (i.e. it stores it as 0).

and doubles and longs have compatability issues with the functions

the prototypes for the functions look (mostly) like this.

int gcd(int a, int b)

and stuff like that

well I want to have it so these ints can be HUGE the algorithm in which I incorporated into each function is MEANT for dealing with larger numbers fast.

IN C or C++

is it possible to store really large numbers like 1008^25 (not XOR)

into some type like int without creating a type-class using vectors?

like I don't want to have to go and rewrite all the functions to use the stuff like vectors and I dont want to write a class with a ton of overloaded operators just for the simple purpose of having larger numbers.

Got any ideas

right now my only idea is write an algorithm to compress the number into patterns and uncompressing functions, but this also takes too much time, i am looking for a fast way to do all this...

Any help or suggestions would be greatly appreciated.

-Luke