

Changelog
=========

Version 2.5.0
-------------

    **New: libmpdec++**

       libmpdec++ is a new C++ library around libmpdec. It frees users from
       manual memory management and allows cleaner code using inline operators.

       libmpdec++ has a thread local context, so inline operators work
       seamlessly with threaded code.

    **features**

    1) New functions *mpd_qset_string_exact*, *mpd_qset_i64_exact* and
       *mpd_qset_u64_exact*.

    2) For very large precisions like *MPD_MAX_PREC* libmpdec failed with
       *MPD_Malloc_error* even when the result was exact and required far
       fewer digits.

       Now libmpdec retries the operation with the smallest possible
       precision for exact results.

    3) ./configure now has the *--enable-profile* option for easier profile
       guided optimization builds.  Using PGO, recent compilers produce
       better optimized libraries with speedups in the order of 20%.

    4) C++ use: All headers now assume at least C++11, so a couple of hacks
       have been removed from the headers.  C++ compatibility is fully
       tested in libmpdec++.

    **behavior changes**

    1) The functions *mpd_ceil*, *mpd_floor* and *mpd_trunc* now set
       *MPD_Invalid_operation* when the input is *NaN* or *Infinity*.

       Previously they returned special values unchanged. That behavior was
       inspired by the similar *to_integral* function from the specification,
       but does not seem useful for the above functions.

    **build fixes**

    1) OS X: Linking has been completely reworked and now uses .dylib.

    2) Windows: vcstdint.h has been removed, Windows now supports stdint.h.

    **bug fixes**

    1) A couple of quiet functions have been made resilient against being
       called with a "dirty" status. Note that it is not recommended in
       general to call quiet functions with any status other than 0.

    2) In runtest.c, fma_eq.decTest and powmod_eq.decTest operands were
       accidentally reversed for the *op_eq_eq* tests.

       Since both the code and the tests assumed reversed operands, the tests
       were correct.  However, for readability this situation has been fixed.

Version 2.4.2
-------------

    **build fixes**

    1) ICC/Windows: the optimized x86 build requires -fp-model=precise.

    2) OS X: the linker requires -dynamiclib and -install_name for building
       a shared library.


Version 2.4.1
-------------

    **build fixes**

    1) The __uint128_t detection in ./configure has been fixed .  Failure to
       detect the option resulted in building the significantly slower ANSI
       target on non-x86/amd64 platforms.

    2) Use -fPIC instead of -fpic to fix a build failure on SPARC platforms.

    3) Split the tests into a faster "make check" and a slower "make check_alloc".
       The latter tests allocation failures but is too slow on older machines.

    4) Generate detailed test output for better feedback on slower machines.

    5) The static library is now built without -fPIC, which is significantly
       faster at least on x86.  Both the static and the shared library are
       now tested separately.

    **bug fixes**

    1) PEP 3101 formatting:  With the '%' format type, a trailing percent sign
       is now also added for infinities and NaNs.


Version 2.4.0
-------------

    **features**

    1) Faster integer to string conversion.

    2) mpd_qln(), mpd_qlog10() and mpd_pow() are now thread-safe.

    3) All functions that take or return C integers are now available in
       both the 64-bit and the 32-bit builds.

    4) Support for cross-compiling.

    5) Scripts for Visual Studio builds.

    **code improvements**

    1) This version is exactly the same as the version shipped with Python-3.3+.
       Large portions of the code have been refactored in order to facilitate
       proofs.  Many ACL2 proofs have been added.

    **removed**

    1) The Python module has been removed from mpdecimal, since both libmpdec
       and cdecimal are included in Python-3.3+.

    2) The large test suite against decNumber as well as the multi-precision
       tests against gmp have been removed, but will be available in a separate
       package.  Naturally these tests are still run as part of the release
       process.


Version 2.3
-----------

    **features**

    1) New test suite with comprehensive tests against decNumber.

    2) Full support for compilers without uint64_t (tested with CompCert).

    **bug fixes**

    1) If ROUND_FLOOR is set and the operand is zero, the functions
       mpd_plus() and mpd_minus() have special cases for the sign of
       the result.


Version 2.2
-----------

    **build process**

    1) configure: append CFLAGS to CONFIG flags.

    2) Makefile: use includedir, libdir, datarootdir, datadir, docdir, DESTDIR.

    **workarounds for toolchain bugs**

    1) Enable workaround for a gcc miscompilation. See:

           `http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491>`_

    2) Enable workaround for the glibc _FORTIFY_SOURCE/memmove bug, which is
       exposed by gcc-4.6. See:

           `http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html <http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html>`_

    **features**

    1) Make PPRO inline assembly PIC-compliant (for the dynamic library).


Version 2.1
-----------

Version 2.1 was never released, but escaped into the wild via the Makefile
and setup.py in cdecimal-1.97-rc2.tar.gz. Both files already had that version
number.

    **features**

    1) Code coverage increased to 100%. This includes every possible
       allocation failure.

    2) Switch build process to ./configure.

    3) Makefile targets for creating coverage reports.

    **bug fixes**

    1) mpd_qget_uint, mpd_qget_u64, mpd_qget_u32 did not raise for
       negative input.

    2) Handle allocation failures in _mpd_fntmul under extreme conditions.



Version 1.2.1
-------------

    **bug fixes**

    1) With MACHINE=ansi64, the macros BSR and BSF used x86 assembly.
       This caused compilation to fail on non-x64 platforms.


Version 1.2
-----------

    **features**

    1) Support for compilers with __uint128_t
       (option MACHINE=ansi64).

    2) Support for other 64-bit compilers
       (option MACHINE=ansi64c32).

    3) Support for legacy compilers without uint64_t
       (option MACHINE=ansi-legacy).

    4) Slightly different build process (please read INSTALL.txt).

    5) If clamp=1, the maximum payload length of a NaN is prec-1.

    **bug fixes**

    1) Fix for mpd_qround_to_int, which did not handle digits
       exceeding the context precision correctly in all cases.

    2) In rare corner cases Underflow was not set in
       transcendental functions.



