Menu

Tree [r2] /
 History

HTTPS access


File Date Author Commit
 build 2009-07-07 baranovve [r2] Readme.txt file added
 include 2009-07-07 baranovve [r1]
 samples 2009-07-07 baranovve [r2] Readme.txt file added
 src 2009-07-07 baranovve [r1]
 tests 2009-07-07 baranovve [r2] Readme.txt file added
 readme.txt 2009-07-07 baranovve [r2] Readme.txt file added

Read Me

LDBLLIB is a C++ library for working with 10-bytes floating-point numbers in Microsoft Visual C++.

1. The Problem.

Microsoft Visual C++ treats type 'long double' as 'double', so sizeof(long double) == 8 there. I don't think this is good. Because when I want to use double, I write "double". I suppose a programmer must decide by himself what real type to use.

2. The Solution.

So I've written the "LDBLLIB" library. The library introduces class "long_double" which represents real type occupying 10 bytes. The "long_double" class and related functions have been implemented with the inline-assembler. The library defines arithmetic operations with objects of type long_double, math functions (atanl, sqrtl, sinl, etc.), limits (std::numeric_limits<long_double>), conversion functions (strtold, gcvtl, etc.), and stream writing/reading operators.

3. How to use the library. 

First compile the "LDBLLIB" library. Go to folder "<ldbllib>\build" and open solution ldbllib.sln (or workspace ldbllib.dsw if you are using VC++ 6.0). Of course use real path to the "LDBLLIB" library instead of <ldbllib>. Build the "ldbllib" project. This must create files "<ldblib>\lib\ldbllib.lib" and "<ldbllib>\lib\ldbllibd.lib". 

Now open/create your project and go to the project's properties. Add path to folder "<ldbllib>\include" to  "Additional Include Directories" (C/C++ -> General), add path to folder "<ldbllib>\lib" to "Additional Library Directories" (Linker->General), and add library name "ldbllib.lib" (for release version) or "ldbllibd.lib" (for debug version) to "Additional Dependencies" (Linker->Input). Then include "ldbllib.h" file in your project's source files, and compile & link.

4. Help. 

The help system isn't provided. However I tried to keep functions having standard behaviour and lists of arguments. fabsl, sqrtl, fecvtl, and others works exactly as functions in C++ standard library do.

Vitaly Baranov (kerrax@mail.ru)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.