Can anyone suggest a good free arbitrary-precision C library?

This is a discussion on Can anyone suggest a good free arbitrary-precision C library? within the C Programming forums, part of the General Programming Boards category; Hi everyone, I am running some computer simulations that eventually fail due to accumulating rounding errors. I need to improve ...

  1. #1
    Registered User TheBigH's Avatar
    Join Date
    May 2010
    Location
    Melbourne, Australia
    Posts
    426

    Can anyone suggest a good free arbitrary-precision C library?

    Hi everyone,
    I am running some computer simulations that eventually fail due to accumulating rounding errors. I need to improve the precision and would like a decent free library that provides higher or arbitrary precision. There seem to be quite a few out there and since I need to re-work several thousand lines of code I need to be sure of getting one that's reliable, fast, has a transparent syntax and provides all the functions I need.

    GMP seems popular but, after reading the manual, I unfortunately have to rule it out because it has no logarithm function and I do not like the look of the interface.

    Can anyone help?
    Cheers,
    H.

  2. #2
    Registered User
    Join Date
    Apr 2006
    Posts
    2,054
    Can you get away with using long double?
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  3. #3
    Registered User TheBigH's Avatar
    Join Date
    May 2010
    Location
    Melbourne, Australia
    Posts
    426
    I'm afraid not. That's what I'm currently using.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,618
    You could consider a companion library to GMP: MPFR.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User TheBigH's Avatar
    Join Date
    May 2010
    Location
    Melbourne, Australia
    Posts
    426
    Thanks, I'll give it a try.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Arbitrary Precision C++
    By bsmath in forum C++ Programming
    Replies: 1
    Last Post: 02-07-2011, 03:35 PM
  2. symbol table in c , suggest good material
    By crocker in forum C Programming
    Replies: 2
    Last Post: 12-23-2009, 09:27 AM
  3. arbitrary precision and operator overloading
    By scwizzo in forum C++ Programming
    Replies: 8
    Last Post: 04-22-2009, 09:48 AM
  4. Please Suggest a Good Portable Network Programming Library
    By Antigloss in forum Networking/Device Communication
    Replies: 0
    Last Post: 01-19-2007, 09:43 PM
  5. Please suggest a good C++ textbook
    By puja399 in forum C++ Programming
    Replies: 7
    Last Post: 11-19-2005, 09:04 PM

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