0

Does anybody know how to use integers larger than the "long long int" type? I have tried using arrays of ints, but mathematical functions are impossible.

Thanks in advance. :cheesy:

4
Contributors
10
Replies
11
Views
10 Years
Discussion Span
Last Post by i_like_pi
0

Thanks, that's exactly what I need.

Just out of curiosity, does anybody know how it works? (i.e. how it stores the numbers and how it performs math functions on them)

Thanks! :cheesy:

0

Going back to my original question, is there a way to create my own bigNum class, and use it like an int?

0

> Just out of curiosity, does anybody know how it works?
Read the documentation and download the code.

0

> is there a way to create my own bigNum class, and use it like an int?
I assume they taught you basic math at school, like how to add multi-digit numbers together, how to subtract them, how to multiply them etc.

It's the same thing, except you deal with multiple bytes.

0

Yes, but how would you use the bigNum class in-place of an int? For example, if you wanted to use the pow() function...

bigNum i;
pow(i,3);

wouldn't work.

0

Of course it wouldn't work, you have to create your own pow function/method for your big integer class you have created.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.