arrays as integers.

Hello, i am working on an assignment where we have to allocate an array of short integers as one single number (an arbitrarily large int with 30+ digits) and perform arithmetic on these arrays.

can someone point me towards a good tutorial on how to do this? i cant seem to find one.

thanks in advance.
It's not a tutorial, but Wikipedia gives an example algorithm for calculating factorials. http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic
The modulo operator is what you are looking for.

For example, the number '12345678' might be thought of as the numbers 12, 34, 56, and 78. To split the array, use modulo (the % operator in C) and integer division.

Sorry, ATM I don't have much time. I'll post back with examples for the GNU MP Bignum library in a little bit...
Topic archived. No new replies allowed.