Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

long integers in C

I want somehow to implement in ANSI C an abstract data type for very long integers. A secure limit would be around 100!, which means even 64bit numbers can be insufficient.
If anybody has a link to a site with source code I'd be grateful.

Thanks in advance,
john
0
jonn_g
Asked:
jonn_g
  • 3
  • 2
  • 2
  • +2
1 Solution
 
ozoCommented:
0
 
fridomCommented:
lcc-win32 provides among others int128 and bignums.

Regards
Friedrich
0
 
jonn_gAuthor Commented:
I am developing this program in Fedora Core 5 linux system and I'd prefer if someone could provide a working source code just for the ADT BigNumber and not a whole C library.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
fridomCommented:
Would you mind to explain me the difference?  What's different form working source code and a C library? In what way would you expect the sources? Object files?

Friedrich
0
 
ozoCommented:
The GMP library does provide source code.
0
 
jonn_gAuthor Commented:
Well creating variables that are of long double type I managed to compute even 100! with a classic recursive factorial function. So to be honest, there is no problem anymore and I didn't use any of your answers...
0
 
ozoCommented:
long double type won't be able to tell the difference between 100! and 100!+1, but if you don't require that, that's fine.
0
 
DarthModCommented:
PAQed with points refunded (175)

DarthMod
Community Support Moderator
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now