I'm implementing a bignum library in C++ for a personal project. I want to have a function for returning the value of an integer as a string and another for getting a string and converting it to an integer. Obviously I am not talking about normal ints, but about my own class for handling integers (imaginatively called Bigint).
The internal representation of Bigint is just an array of unsigned longs where the first element is interpreted as value*2^64^0 the second the second element is interpreted as value*2^64^1 and so on. Basically it's just like any other numeral system only the base is 2^64.
I am completely stumped on this. Do you have any ideas on where should I start?
Thanks.
The internal representation of Bigint is just an array of unsigned longs where the first element is interpreted as value*2^64^0 the second the second element is interpreted as value*2^64^1 and so on. Basically it's just like any other numeral system only the base is 2^64.
I am completely stumped on this. Do you have any ideas on where should I start?
Thanks.