|
-
Nov 3rd, 2002, 12:41 AM
#1
Thread Starter
Junior Member
Working with very large numbers.
Hi,
I am working on some code that is using some very large numbers. What is the absolute largest numeric data type that I can use before I have to use something fancy?
What I am doing is making what is called a Rabbiski sequence, which is where the user types in 2 numbers, and I need to generate a sequence of 10 numbers, where is one is the product of the previous 2. As you can imagine, you get very large numbers very quickly. Once you have the 10 numbers, you need to print the sum of them.
This is for an assignment, so please don't post any code, I don't want to get caught for plagarism. However, if you could let me know how to deal with large numbers in C++, or have any tips I would appreciate it.
BTW - One problem that I am having is that I can generate the 10 numbers, however when I add them up and try to display the sum is just says "-NaN".
Thanks in advance,
Michael Bray
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
|
Click Here to Expand Forum to Full Width
|