• Home
Name Date Size #Lines LOC

..--

literature/03-May-2024-1,7571,129

README.txtD03-May-20243.7 KiB9166

basearith.cD03-May-202416.6 KiB658388

basearith.hD03-May-20246.9 KiB223110

bits.hD03-May-20244.3 KiB193114

constants.cD03-May-20245.4 KiB13374

constants.hD03-May-20243.3 KiB9139

context.cD03-May-20245.9 KiB287216

convolute.cD03-May-20244.4 KiB175123

convolute.hD03-May-20241.8 KiB5110

crt.cD03-May-20244.5 KiB18084

crt.hD03-May-20241.7 KiB488

difradix2.cD03-May-20244.4 KiB17489

difradix2.hD03-May-20241.7 KiB499

fnt.cD03-May-20242.3 KiB8236

fnt.hD03-May-20241.7 KiB509

fourstep.cD03-May-20246.4 KiB258160

fourstep.hD03-May-20241.7 KiB499

io.cD03-May-202442.3 KiB1,5841,119

io.hD03-May-20241.9 KiB6023

memory.cD03-May-20247.6 KiB298176

mpalloc.hD03-May-20241.8 KiB529

mpdecimal.cD03-May-2024226.1 KiB8,4186,215

mpdecimal.hD03-May-202440.3 KiB848618

numbertheory.cD03-May-20243.5 KiB13370

numbertheory.hD03-May-20242.3 KiB7932

sixstep.cD03-May-20245.7 KiB215138

sixstep.hD03-May-20241.7 KiB499

transpose.cD03-May-20247.3 KiB277186

transpose.hD03-May-20242 KiB6318

typearith.hD03-May-202416.8 KiB670446

umodarith.hD03-May-202415.6 KiB651415

vccompat.hD03-May-20241.8 KiB5821

vcdiv64.asmD03-May-20241.6 KiB4944

vcstdint.hD03-May-20247.1 KiB233143

README.txt

1
2
3libmpdec
4========
5
6libmpdec is a fast C/C++ library for correctly-rounded arbitrary precision
7decimal floating point arithmetic. It is a complete implementation of
8Mike Cowlishaw/IBM's General Decimal Arithmetic Specification.
9
10
11Files required for the Python _decimal module
12=============================================
13
14  Core files for small and medium precision arithmetic
15  ----------------------------------------------------
16
17    basearith.{c,h}  ->  Core arithmetic in base 10**9 or 10**19.
18    bits.h           ->  Portable detection of least/most significant one-bit.
19    constants.{c,h}  ->  Constants that are used in multiple files.
20    context.c        ->  Context functions.
21    io.{c,h}         ->  Conversions between mpd_t and ASCII strings,
22                         mpd_t formatting (allows UTF-8 fill character).
23    memory.{c,h}     ->  Allocation handlers with overflow detection
24                         and functions for switching between static
25                         and dynamic mpd_t.
26    mpdecimal.{c,h}  ->  All (quiet) functions of the specification.
27    typearith.h      ->  Fast primitives for double word multiplication,
28                         division etc.
29
30    Visual Studio only:
31    ~~~~~~~~~~~~~~~~~~~
32      vccompat.h    ->  snprintf <==> sprintf_s and similar things.
33      vcstdint.h    ->  stdint.h (included in VS 2010 but not in VS 2008).
34      vcdiv64.asm   ->  Double word division used in typearith.h. VS 2008 does
35                        not allow inline asm for x64. Also, it does not provide
36                        an intrinsic for double word division.
37
38  Files for bignum arithmetic:
39  ----------------------------
40
41    The following files implement the Fast Number Theoretic Transform
42    used for multiplying coefficients with more than 1024 words (see
43    mpdecimal.c: _mpd_fntmul()).
44
45      umodarith.h        ->  Fast low level routines for unsigned modular arithmetic.
46      numbertheory.{c,h} ->  Routines for setting up the Number Theoretic Transform.
47      difradix2.{c,h}    ->  Decimation in frequency transform, used as the
48                             "base case" by the following three files:
49
50        fnt.{c,h}        ->  Transform arrays up to 4096 words.
51        sixstep.{c,h}    ->  Transform larger arrays of length 2**n.
52        fourstep.{c,h}   ->  Transform larger arrays of length 3 * 2**n.
53
54      convolute.{c,h}    ->  Fast convolution using one of the three transform
55                             functions.
56      transpose.{c,h}    ->  Transpositions needed for the sixstep algorithm.
57      crt.{c,h}          ->  Chinese Remainder Theorem: use information from three
58                             transforms modulo three different primes to get the
59                             final result.
60
61
62Pointers to literature, proofs and more
63=======================================
64
65  literature/
66  -----------
67
68    REFERENCES.txt  ->  List of relevant papers.
69    bignum.txt      ->  Explanation of the Fast Number Theoretic Transform (FNT).
70    fnt.py          ->  Verify constants used in the FNT; Python demo for the
71                        O(N**2) discrete transform.
72
73    matrix-transform.txt -> Proof for the Matrix Fourier Transform used in
74                            fourstep.c.
75    six-step.txt         -> Show that the algorithm used in sixstep.c is
76                            a variant of the Matrix Fourier Transform.
77    mulmod-64.txt        -> Proof for the mulmod64 algorithm from
78                            umodarith.h.
79    mulmod-ppro.txt      -> Proof for the x87 FPU modular multiplication
80                            from umodarith.h.
81    umodarith.lisp       -> ACL2 proofs for many functions from umodarith.h.
82
83
84Library Author
85==============
86
87  Stefan Krah <skrah@bytereef.org>
88
89
90
91