Jump to content

C Language Data Types

Featured Replies

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 :)

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.

  • Author

Ok, thanks.

 

Any links for the modules, while I'm at it?

  • Author

Thanks :)

Archived

This topic is now archived and is closed to further replies.

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.