CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Location
    Foggy California
    Posts
    1,245

    Question 96, 128 bit floating point C++ library?

    Anyone know of an open-source 96 or 128 bit floating point C++ library? (Or even better, a specifiable but fixed bit library?)

    I have seen and used apfloat, but the one thing I don't like about it is that apfloat numbers extend its precision with certain operations -- meaning that I have to continually go back an tell it I only need n significant digits.

    What I'm trying to say is that I'm looking for something like:

    class Float96;
    class Float128;

    or:

    template<size_t bits>
    class NBitFloat
    {
    //...
    };

    Thanks guys!

    - Kevin

  2. #2
    Join Date
    Sep 2002
    Posts
    1,747
    Have you tried doubledouble from the oonumerics site? They also have EXTNUM, which changes only the exponent precision, and I believe LiDiA and some of the other packages use earlier forms of doubledouble.
    */*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/

    "It's hard to believe in something you don't understand." -- the sidhi X-files episode

    galathaea: prankster, fablist, magician, liar

  3. #3
    Join Date
    Nov 2002
    Location
    Foggy California
    Posts
    1,245
    No, I hadn't seen it yet. It certainly looks easy to use.... I'll give it a whirl right now! Thanks!!!

    -Kevin

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449
    You can try the 96bit library on PJ Naughter's site:

    http://www.naughter.com/int96.html

    Even though it says "MFC", very litte of it is MFC and won't take long to convert it or just plain rip it out.

    Regards,

    Paul McKenzie

  5. #5
    Join Date
    Nov 2002
    Location
    Foggy California
    Posts
    1,245
    Thanks guys for the help. I really needed to test a routine for singular value decomposition of matrices -- there is one matrix that I'm having trouble with docomposing accurately. I wanted to make sure it was a precision thing (and that I wasn't going insane). It turns out it is!

    I think that the doubledouble library is pretty simple for doing tests like this one. Thanks again!

    - Kevin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured