Thread: Getting enough decimals

  1. #1
    Registered User Drogin's Avatar
    Join Date
    Oct 2005
    Location
    Norway
    Posts
    105

    Getting enough decimals

    Hey!
    I was wondering... Scientists have found many millions of decimals of the "pi", using computer technology.
    Lets say I wanted to calculate a very huge number in C++, how would I do that? One long int/float/double, is too little...


    Is it possible to "merge" or treat cells as they are merged?

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Is it possible to "merge" or treat cells as they are merged?
    I don't know what you mean by that, but it's very possible to write a huge number library in C/C++. For a ready-made library (also with a C++ wrapper class) you can check out GMP.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Registered User Drogin's Avatar
    Join Date
    Oct 2005
    Location
    Norway
    Posts
    105
    I don't know what you mean by that
    When i say "treat as merged", i mean, like
    making a class which for example uses "new", to create as many floats/ints/doubles needed, and then perform something like first calculating float/int/double variable1, then transfer the last digit to float/int/double variable2, and continue the calulations on that one, and so on...

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Click on the link JaWiB provided, it has all your answers.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help to show decimals
    By engstudent363 in forum C Programming
    Replies: 4
    Last Post: 02-19-2008, 04:13 PM
  2. allow decimals
    By dankassdann in forum C++ Programming
    Replies: 3
    Last Post: 10-28-2006, 06:41 PM
  3. multiple decimals = problem
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 07-18-2002, 08:32 AM
  4. Decimals To Binary
    By kas2002 in forum C++ Programming
    Replies: 8
    Last Post: 06-08-2002, 11:12 AM
  5. Decimals to Fractions
    By ToasterPas in forum C++ Programming
    Replies: 4
    Last Post: 12-28-2001, 12:58 PM