cpython/Modules/_decimal/libmpdec
Stefan Krah 45059eb1d0 1) Prepare libmpdec for the 2.4.0 release. None of the following changes affects
_decimal:

      o Make all "mpd_t to C integer" conversion functions available in both the
        64-bit and the 32-bit versions.

      o Make all mixed mpd_t/C integer arithmetic functions available in the
        32-bit version.

      o Better handling of __STDC_LIMIT_MACROS for C++ users.

      o Add struct tags (at the request of C++ users).

2) Check for libmpdec.so.2 if --with-system-libmpdec is used.
2013-11-24 19:44:57 +01:00
..
literature Remove trailing whitespace. 2013-01-16 15:16:10 +01:00
README.txt Remove trailing whitespace. 2013-01-16 15:16:10 +01:00
basearith.c Proactive reliability fix for broken FPUs: The base conversion functions 2012-06-30 18:05:33 +02:00
basearith.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
bits.h Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
constants.c Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
constants.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
context.c Whitespace. 2012-03-21 20:21:20 +01:00
convolute.c Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
convolute.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
crt.c Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
crt.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
difradix2.c Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
difradix2.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
fnt.c Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
fnt.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
fourstep.c Fix formatting after removing tabs. 2012-03-23 16:34:41 +01:00
fourstep.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
io.c Remove trailing whitespace. 2013-01-16 15:16:10 +01:00
io.h Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
memory.c 1) Remove claim of an input invariant that is only true for static mpd_t. 2012-04-10 23:11:54 +02:00
memory.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
mpdecimal.c 1) Prepare libmpdec for the 2.4.0 release. None of the following changes affects 2013-11-24 19:44:57 +01:00
mpdecimal.h 1) Prepare libmpdec for the 2.4.0 release. None of the following changes affects 2013-11-24 19:44:57 +01:00
numbertheory.c Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
numbertheory.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
sixstep.c Fix formatting after removing tabs. 2012-03-23 16:34:41 +01:00
sixstep.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
transpose.c Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
transpose.h Issue #16745: Hide symbols in _decimal.so. 2012-12-22 14:18:35 +01:00
typearith.h Support gcc's -ansi flag: use "__asm__" instead of "asm". 2012-09-30 17:31:04 +02:00
umodarith.h Remove trailing whitespace. 2013-01-16 15:16:10 +01:00
vccompat.h Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
vcdiv64.asm Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
vcstdint.h Remove trailing whitespace. 2013-01-16 15:16:10 +01:00

README.txt


libmpdec
========

libmpdec is a fast C/C++ library for correctly-rounded arbitrary precision
decimal floating point arithmetic. It is a complete implementation of
Mike Cowlishaw/IBM's General Decimal Arithmetic Specification.


Files required for the Python _decimal module
=============================================

  Core files for small and medium precision arithmetic
  ----------------------------------------------------

    basearith.{c,h}  ->  Core arithmetic in base 10**9 or 10**19.
    bits.h           ->  Portable detection of least/most significant one-bit.
    constants.{c,h}  ->  Constants that are used in multiple files.
    context.c        ->  Context functions.
    io.{c,h}         ->  Conversions between mpd_t and ASCII strings,
                         mpd_t formatting (allows UTF-8 fill character).
    memory.{c,h}     ->  Allocation handlers with overflow detection
                         and functions for switching between static
                         and dynamic mpd_t.
    mpdecimal.{c,h}  ->  All (quiet) functions of the specification.
    typearith.h      ->  Fast primitives for double word multiplication,
                         division etc.

    Visual Studio only:
    ~~~~~~~~~~~~~~~~~~~
      vccompat.h    ->  snprintf <==> sprintf_s and similar things.
      vcstdint.h    ->  stdint.h (included in VS 2010 but not in VS 2008).
      vcdiv64.asm   ->  Double word division used in typearith.h. VS 2008 does
                        not allow inline asm for x64. Also, it does not provide
                        an intrinsic for double word division.

  Files for bignum arithmetic:
  ----------------------------

    The following files implement the Fast Number Theoretic Transform
    used for multiplying coefficients with more than 1024 words (see
    mpdecimal.c: _mpd_fntmul()).

      umodarith.h        ->  Fast low level routines for unsigned modular arithmetic.
      numbertheory.{c,h} ->  Routines for setting up the Number Theoretic Transform.
      difradix2.{c,h}    ->  Decimation in frequency transform, used as the
                             "base case" by the following three files:

        fnt.{c,h}        ->  Transform arrays up to 4096 words.
        sixstep.{c,h}    ->  Transform larger arrays of length 2**n.
        fourstep.{c,h}   ->  Transform larger arrays of length 3 * 2**n.

      convolute.{c,h}    ->  Fast convolution using one of the three transform
                             functions.
      transpose.{c,h}    ->  Transpositions needed for the sixstep algorithm.
      crt.{c,h}          ->  Chinese Remainder Theorem: use information from three
                             transforms modulo three different primes to get the
                             final result.


Pointers to literature, proofs and more
=======================================

  literature/
  -----------

    REFERENCES.txt  ->  List of relevant papers.
    bignum.txt      ->  Explanation of the Fast Number Theoretic Transform (FNT).
    fnt.py          ->  Verify constants used in the FNT; Python demo for the
                        O(N**2) discrete transform.

    matrix-transform.txt -> Proof for the Matrix Fourier Transform used in
                            fourstep.c.
    six-step.txt         -> Show that the algorithm used in sixstep.c is
                            a variant of the Matrix Fourier Transform.
    mulmod-64.txt        -> Proof for the mulmod64 algorithm from
                            umodarith.h.
    mulmod-ppro.txt      -> Proof for the x87 FPU modular multiplication
                            from umodarith.h.
    umodarith.lisp       -> ACL2 proofs for many functions from umodarith.h.


Library Author
==============

  Stefan Krah <skrah@bytereef.org>