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:

i_like_pi 0 Newbie Poster

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:

Infarction 503 Posting Virtuoso

i_like_pi 0 Newbie Poster

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:

i_like_pi 0 Newbie Poster

Oh, and also, how do you use it in windows?

iamthwee

i_like_pi 0 Newbie Poster

Salem 5,138 Posting Sage

Read the documentation and download the code.

Salem 5,138 Posting Sage

> 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.

i_like_pi 0 Newbie Poster

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.

iamthwee

i_like_pi 0 Newbie Poster

Ok, your right. Well, I had better get started!

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.