large #s?

This is a discussion on large #s? within the C++ Programming forums, part of the General Programming Boards category; I'm trying to work on a prime factorization program, but need a really really big type. One that holds at ...

  1. #1
    Unregistered
    Guest

    large #s?

    I'm trying to work on a prime factorization program, but need a really really big type. One that holds at least 50 decimal digits. Is there such a thing? It would be very good if it was some type of float as well. I know the double is large, but I'm not sure how accurate it is.

  2. #2
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  3. #3
    Seņor Member
    Join Date
    Jan 2002
    Posts
    561
    In APCS we use a class called BigInt. It stores the # as an array of chars. It is really slow but you can use numbers that are thousands of digits long. You might want to look into making something like that.

  4. #4
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330
    I believe long double is a type, try that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [Large file][Value too large for defined data type]
    By salsan in forum Linux Programming
    Replies: 11
    Last Post: 02-05-2008, 04:18 AM
  2. Computing Large Values
    By swbluto in forum C++ Programming
    Replies: 8
    Last Post: 04-07-2005, 04:04 AM
  3. Representing a Large Integer with an Array
    By random_accident in forum C Programming
    Replies: 3
    Last Post: 03-03-2005, 08:56 PM
  4. Representing a Large Integer with an Array
    By random_accident in forum C++ Programming
    Replies: 3
    Last Post: 03-03-2005, 12:23 PM
  5. large bitmap file
    By sunis in forum Windows Programming
    Replies: 3
    Last Post: 01-16-2003, 04:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21