Thread: calculations with long decimals

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    44

    calculations with long decimals

    Hello

    I was searching around for libraries that do these kind of calculations but I got lost, for example I searched for gmplib, I downloaded it but couldn't understand how to use it, I would just like to have a simple cpp and header file which does these kind of calculations not a huge library.

    But assuming that someone has done this work, there has to be some kind of algorithm that was used.

    I'm thinking of creating my own class, but I'm not sure how to start.

    can someone provide me with some help? I'm totally confused

    PS: I want to use these calculations in order to find out PI, there are plenty algorithms online about this, but can't figure out how to make calculations with large decimals.

    thanks

  2. #2
    Registered User
    Join Date
    Nov 2010
    Posts
    15
    try the eigen library:

    Main Page - Eigen

    it's all headers and is quite easy to play with (I added long doubles to the matrix and vector types really easily, even though I had never done any templating before), don't put it in your linker's list tho becuase that'll cause problems, just in your include's list.

    License: LGPL3+ & GPL2+

    though I could be wrong about this suggestion, I am not sure it supplies really big numbers. Sorry man.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Faults with XOR LL
    By seePhor in forum C Programming
    Replies: 5
    Last Post: 03-12-2010, 12:20 AM
  2. sorting using pointer to pointer not working
    By eager2no in forum C Programming
    Replies: 17
    Last Post: 09-21-2008, 12:52 AM
  3. hton long long
    By carrotcake1029 in forum C Programming
    Replies: 1
    Last Post: 06-01-2008, 08:26 PM
  4. Insertion Sort Problem
    By silicon in forum C++ Programming
    Replies: 1
    Last Post: 05-08-2005, 12:30 PM
  5. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM