Getting enough decimals

This is a discussion on Getting enough decimals within the C++ Programming forums, part of the General Programming Boards category; Hey! I was wondering... Scientists have found many millions of decimals of the "pi", using computer technology. Lets say I ...

  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,069
    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, 03: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, 11:58 AM

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