-
May 5th, 2008, 06:57 PM
#1
Large integer datatypes in C++
Lately I've started working on programs that would require me to compute quite large values like those in the order of 10**10. I wrote my own exponentiation function after reading up the 'exponentiation by squaring' algorithm as the cmath function, pow() can return upto long double only which is totally unsuitable for my needs. But the problem is even after specifying the return type as long long unsigned, it seems the return value is too large to fit in it and instead I get a return value of 0.
I have seen some people using uint32_t and uint64_t datatypes, but I'm not sure what exactly they do. Can somebody guide me in this direction?
Similar Threads
-
By mjk in forum Other Tutorials Forum
Replies: 1
Last Post: June 20th, 2004, 07:44 PM
-
By gore in forum Operating Systems
Replies: 3
Last Post: March 7th, 2004, 08:02 AM
-
By gore in forum Newbie Security Questions
Replies: 11
Last Post: December 29th, 2003, 08:01 AM
-
By tampabay420 in forum Programming Security
Replies: 0
Last Post: February 20th, 2003, 03:02 PM
-
Replies: 1
Last Post: July 15th, 2002, 03:46 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|