1 2 3Changelog 4========= 5 6Version 4.0.0 7------------- 8 9general 10~~~~~~~ 11 12 **sync soversion and major_version** 13 14 - The added number formatting feature requires an ABI change, hence the 15 increase to SOVERSION=4. 16 17 - Packagers outside of the Linux distributions sometimes use the major 18 version number as the equivalent of SOVERSION on their platforms and 19 have an incorrect SOVERSION for 2.5.1, which requires SOVERSION=3. 20 21 - While SOVERSION is not required to match the major version number 22 (example: glibc), mpdecimal will from now on take the path of least 23 resistance and always use SOVERSION=MPD_MAJOR_VERSION. 24 25 - The jump to 4.0.0 should also remind users that a C++ library is 26 available. 27 28build/install 29~~~~~~~~~~~~~ 30 31 **features** 32 33 - Support for out-of-tree build. 34 35 - Support for pkg-config. 36 37 - Unix: support for Loongson. 38 39 - Unix: support for CheriBSD. 40 41 - Compilers: support for icx, icpx, ibm-clang_r, ibm-clang++_r, CompCert, 42 clang-cl and emscripten. 43 44 - Windows: support for MSYS2/MinGW. 45 46 - MSVC: the build now uses /O2 /DNDEBUG. 47 48 - MSVC: new arm64/arm32 cross build scripts. 49 50 - AIX: the shared libraries are now installed as versioned objects, e.g., 51 shr4.o, shr4_64.o. 52 53 - New ``./configure`` switches: 54 55 ``--enable-static``: enable/disable the build of the static libraries 56 (default: enabled). 57 58 ``--enable-pc``: enable/disable the install of the pkgconfig files 59 (default: enabled). 60 61 ``--enable-doc``: enable/disable the install of the documentation 62 (default: enabled). 63 64 - New ``./configure`` behavior: 65 66 On multilib platforms like AIX that default to 32-bit the 64-bit build can 67 be forced with a single ``./configure MACHINE=uint128`` (ibm-clang, gcc) 68 or ``./configure MACHINE=ansi64`` (xlc) rather than explicitly setting 69 ``CFLAGS``, ``LDFLAGS``, ``CXXFLAGS`` and ``LDXXFLAGS``. 70 71 Note that on most other (multilib) platforms the default is 64-bit and the 72 optimal configuration is chosen by just using ``./configure``. 73 74 - New man pages direct users to the mpdecimal-doc package or the online 75 HTML documentation. 76 77 **tests** 78 79 - The C++ tests now automatically skip a small number of bignum tests if 80 the std::thread stack size (which cannot be altered) is less than 512K. 81 82 For all other tests a thread stack size of roughly 50K is sufficient. 83 84 - Files in the tests/testdata_dist directory have been significantly 85 abbreviated in order to facilitate testing on slower platforms. The 86 tests take 5s on a modern x86_64 platform. 87 88 The previous tests have been moved to the separate mpdecimal-testdata 89 package (replace tests/testdata_dist with the renamed mpdecimal-testdata 90 directory). 91 92 **toolchain issues** 93 94 - AIX: The preferred C/C++ compilers are ibm-clang_r and ibm-clang_r++. 95 g++ has sporadic C++11 threading issues that only show up in long running 96 programs (or short ones with a sufficient number of repetitions): 97 98 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98390 99 100 If you only use libmpdec (``--disable-cxx``), gcc and xlc are very stable. 101 102 **changed** 103 104 - The ``--enable-profile`` configure option has been removed due to fragile 105 integration with a sequence like ``make && make install``. The new method 106 is ``make profile && make install``. 107 108 **removed** 109 110 - The prebuilt HTML documentation is now in the separate mpdecimal-doc 111 package, which gives distributions that reject prebuilt documentation 112 the option to disregard it and use the new man pages. 113 114libmpdec 115~~~~~~~~ 116 117 **features** 118 119 - Add the "z" format specifier (coerce negative zeros to positive). 120 121 - In extremely rare cases the transcendental functions (exp, ln, log10) did 122 not set the Subnormal/Underflow flags. The reason is that in the case of 123 an exponent boundary the Ziv correction loop for correct rounding requires 124 very few iterations to arrive at the correctly rounded result, but may 125 need many more iterations to arrive at the correct flags. 126 127 In these cases, Subnormal/Underflow is not very informative, so the status 128 quo was to skip the extra iterations. 129 130 Version 4.0.0 now specializes exponent boundary cases and uses up to five 131 additional iterations to set Subnormal/Underflow. The refactored code has 132 no speed penalty on average; in fact, in the deccheck tests (random tests 133 with a bias towards corner cases) it is slightly faster. 134 135 No cases have been found where more than two additional iterations are 136 required, but they may exist. 137 138 **reliability fixes** 139 140 - mpd_qset_string_exact(), mpd_qset_i64_exact() and mpd_qset_u64_exact() 141 can now be called with a nonzero status. Previously, the functions 142 could return NaN/Invalid_operation in that case. 143 144 This is listed under "reliability fixes" since there is no possible 145 scenario under which these functions would legitimately be called with 146 a nonzero status. 147 148libmpdec++ 149~~~~~~~~~~ 150 151 **features** 152 153 - Add input validation for Decimal.shiftl(), Decimal.shiftr() and 154 Decimal::ln10(). 155 156 157Version 2.5.1 158------------- 159 160libmpdec 161~~~~~~~~ 162 163 **features** 164 165 - New functions for conversion between mpd_t and a decimal triple 166 with a split uint128_t coefficient. 167 168 - All symbols in the header files now have an MPD_* or mpd_* prefix. 169 170 - libmpdec/.objs/symbols64.exp and libmpdec/.objs/symbols32.exp contain 171 all symbols of the exported API. The files are almost identical, but 172 mpd_qsset_i64, mpd_sset_i64, mpd_qsset_u64 and mpd_sset_u64 are only 173 available in the 64-bit build. 174 175 libmpdec/.objs/libmpdec.imp is the unified 64/32-bit import file 176 for AIX. 177 178 - The new test target *make check_local* does not attempt to download 179 dectest.zip. This is useful for packagers whose infrastructure does 180 not allow downloading during the testing phase. 181 182 *make check* is still preferable because it runs all tests. 183 184 **style fixes** 185 186 - Apply several clang-tidy suggestions (high diagnostic level). 187 188 **build features** 189 190 - AIX: full support for xlc/gcc builds in ./configure. 191 - full support for AIX-style shared libraries. 192 - full support for AIX multilib header. 193 194 **build fixes** 195 196 - Update config.guess and config.sub in order to support IBM Power 197 architectures. 198 199 - Fix false positive _FORTIFY_SOURCE warning on Fedora. 200 201libmpdec++ 202~~~~~~~~~~ 203 204 **features** 205 206 - New methods for conversion between Decimal and a decimal triple 207 with a split uint128_t coefficient. 208 209 - decimal::Context now uses default constructors wherever possible. 210 211 - AIX: The tests now have a --pthread option. The default thread stack 212 size on AIX (96K) makes std::thread unusable for runtest.cc, which needs 213 around 300K. 214 215 - Windows: The DLL can now be built. Since DLLs do not support the 216 C++11 extern thread_local context, each translation unit gets its 217 own static reference to the thread_local context. This should 218 preserve the semantics at the expense of clarity. 219 220 Note that this scheme is specific to the DLL build; the static 221 library build on Windows as well as all other operating systems 222 (except for OpenBSD and Solaris) use the C++11 extern thread_local 223 context. 224 225 - OpenBSD, Solaris: The shared library now works using the above scheme. 226 For simplicity, both the shared and static libraries use the workaround. 227 228 **style fixes** 229 230 - Apply several clang-tidy suggestions (high diagnostic level). 231 232 **bug fixes** 233 234 - DecimalException now inherits from std::runtime_error instead 235 of std::exception. This automatically provides a nothrow copy 236 constructor. 237 238 - Use mpd_free() instead of free(). This only affects applications using 239 the libmpdec custom allocators. 240 241 **build fixes** 242 243 - Undefine some additional math.h macros for non-compliant C++11 244 implementations. 245 246 - libmpdec++ is now linked against libmpdec. 247 248 249Version 2.5.0 250------------- 251 252 **New: libmpdec++** 253 254 libmpdec++ is a new C++ library around libmpdec. It frees users from 255 manual memory management and allows cleaner code using inline operators. 256 257 libmpdec++ has a thread local context, so inline operators work 258 seamlessly with threaded code. 259 260 **features** 261 262 1) New functions *mpd_qset_string_exact*, *mpd_qset_i64_exact* and 263 *mpd_qset_u64_exact*. 264 265 2) For very large precisions like *MPD_MAX_PREC* libmpdec failed with 266 *MPD_Malloc_error* even when the result was exact and required far 267 fewer digits. 268 269 Now libmpdec retries the operation with the smallest possible 270 precision for exact results. 271 272 3) ./configure now has the *--enable-profile* option for easier profile 273 guided optimization builds. Using PGO, recent compilers produce 274 better optimized libraries with speedups in the order of 20%. 275 276 4) C++ use: All headers now assume at least C++11, so a couple of hacks 277 have been removed from the headers. C++ compatibility is fully 278 tested in libmpdec++. 279 280 **behavior changes** 281 282 1) The functions *mpd_ceil*, *mpd_floor* and *mpd_trunc* now set 283 *MPD_Invalid_operation* when the input is *NaN* or *Infinity*. 284 285 Previously they returned special values unchanged. That behavior was 286 inspired by the similar *to_integral* function from the specification, 287 but does not seem useful for the above functions. 288 289 **build fixes** 290 291 1) OS X: Linking has been completely reworked and now uses .dylib. 292 293 2) Windows: vcstdint.h has been removed, Windows now supports stdint.h. 294 295 **bug fixes** 296 297 1) A couple of quiet functions have been made resilient against being 298 called with a "dirty" status. Note that it is not recommended in 299 general to call quiet functions with any status other than 0. 300 301 2) In runtest.c, fma_eq.decTest and powmod_eq.decTest operands were 302 accidentally reversed for the *op_eq_eq* tests. 303 304 Since both the code and the tests assumed reversed operands, the tests 305 were correct. However, for readability this situation has been fixed. 306 307 308Version 2.4.2 309------------- 310 311 **build fixes** 312 313 1) ICC/Windows: the optimized x86 build requires -fp-model=precise. 314 315 2) OS X: the linker requires -dynamiclib and -install_name for building 316 a shared library. 317 318 319Version 2.4.1 320------------- 321 322 **build fixes** 323 324 1) The __uint128_t detection in ./configure has been fixed . Failure to 325 detect the option resulted in building the significantly slower ANSI 326 target on non-x86/amd64 platforms. 327 328 2) Use -fPIC instead of -fpic to fix a build failure on SPARC platforms. 329 330 3) Split the tests into a faster "make check" and a slower "make check_alloc". 331 The latter tests allocation failures but is too slow on older machines. 332 333 4) Generate detailed test output for better feedback on slower machines. 334 335 5) The static library is now built without -fPIC, which is significantly 336 faster at least on x86. Both the static and the shared library are 337 now tested separately. 338 339 **bug fixes** 340 341 1) PEP 3101 formatting: With the '%' format type, a trailing percent sign 342 is now also added for infinities and NaNs. 343 344 345Version 2.4.0 346------------- 347 348 **features** 349 350 1) Faster integer to string conversion. 351 352 2) mpd_qln(), mpd_qlog10() and mpd_pow() are now thread-safe. 353 354 3) All functions that take or return C integers are now available in 355 both the 64-bit and the 32-bit builds. 356 357 4) Support for cross-compiling. 358 359 5) Scripts for Visual Studio builds. 360 361 **code improvements** 362 363 1) This version is exactly the same as the version shipped with Python-3.3+. 364 Large portions of the code have been refactored in order to facilitate 365 proofs. Many ACL2 proofs have been added. 366 367 **removed** 368 369 1) The Python module has been removed from mpdecimal, since both libmpdec 370 and cdecimal are included in Python-3.3+. 371 372 2) The large test suite against decNumber as well as the multi-precision 373 tests against gmp have been removed, but will be available in a separate 374 package. Naturally these tests are still run as part of the release 375 process. 376 377 378Version 2.3 379----------- 380 381 **features** 382 383 1) New test suite with comprehensive tests against decNumber. 384 385 2) Full support for compilers without uint64_t (tested with CompCert). 386 387 **bug fixes** 388 389 1) If ROUND_FLOOR is set and the operand is zero, the functions 390 mpd_plus() and mpd_minus() have special cases for the sign of 391 the result. 392 393 394Version 2.2 395----------- 396 397 **build process** 398 399 1) configure: append CFLAGS to CONFIG flags. 400 401 2) Makefile: use includedir, libdir, datarootdir, datadir, docdir, DESTDIR. 402 403 **workarounds for toolchain bugs** 404 405 1) Enable workaround for a gcc miscompilation. See: 406 407 `http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491>`_ 408 409 2) Enable workaround for the glibc _FORTIFY_SOURCE/memmove bug, which is 410 exposed by gcc-4.6. See: 411 412 `http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html <http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html>`_ 413 414 **features** 415 416 1) Make PPRO inline assembly PIC-compliant (for the dynamic library). 417 418 419Version 2.1 420----------- 421 422Version 2.1 was never released, but escaped into the wild via the Makefile 423and setup.py in cdecimal-1.97-rc2.tar.gz. Both files already had that version 424number. 425 426 **features** 427 428 1) Code coverage increased to 100%. This includes every possible 429 allocation failure. 430 431 2) Switch build process to ./configure. 432 433 3) Makefile targets for creating coverage reports. 434 435 **bug fixes** 436 437 1) mpd_qget_uint, mpd_qget_u64, mpd_qget_u32 did not raise for 438 negative input. 439 440 2) Handle allocation failures in _mpd_fntmul under extreme conditions. 441 442 443 444Version 1.2.1 445------------- 446 447 **bug fixes** 448 449 1) With MACHINE=ansi64, the macros BSR and BSF used x86 assembly. 450 This caused compilation to fail on non-x64 platforms. 451 452 453Version 1.2 454----------- 455 456 **features** 457 458 1) Support for compilers with __uint128_t 459 (option MACHINE=ansi64). 460 461 2) Support for other 64-bit compilers 462 (option MACHINE=ansi64c32). 463 464 3) Support for legacy compilers without uint64_t 465 (option MACHINE=ansi-legacy). 466 467 4) Slightly different build process (please read INSTALL.txt). 468 469 5) If clamp=1, the maximum payload length of a NaN is prec-1. 470 471 **bug fixes** 472 473 1) Fix for mpd_qround_to_int, which did not handle digits 474 exceeding the context precision correctly in all cases. 475 476 2) In rare corner cases Underflow was not set in 477 transcendental functions. 478 479 480 481