Jump to content

C Language Data Types


Shadow

Recommended Posts

Well, here I am with another C oriented question. To put it simply, what if an unsigned long long int data type just isn't enough? If you want a specific example of why I need this;

 

I made a program that generates Fibonacci Numbers. You can input how many numbers you want generated. Unfortunately, I can't generate more than 94 of them, because then the numbers are just too big for the data type to remember. How can I get around that? I know it must be possible, otherwise how could we know for example that the biggest prime number (yet found I mean) is [math]2^{32,582,657}-1[/math]?

 

Thanks in advance for any help :)

Link to comment
Share on other sites

C does not naturally support large integer numbers, as far as I know. So you either have to write the structures for large integers yourself, get some module doing that from the internet or switch to a programming language that supports large integers.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.