• Home
Name Date Size #Lines LOC

..--

.objs/04-Jul-2025-701694

.pc/04-Jul-2025-1210

.profile/04-Jul-2025-3628

examples/04-Jul-2025-627311

literature/04-Jul-2025-1,7551,131

Makefile.inD04-Jul-20259.4 KiB316235

Makefile.vcD04-Jul-20258.1 KiB289219

README.txtD04-Jul-20253.5 KiB8562

basearith.cD04-Jul-202516.5 KiB650386

basearith.hD04-Jul-20256.9 KiB218109

bench.cD04-Jul-20253.4 KiB13683

bench_full.cD04-Jul-20254.7 KiB193128

bits.hD04-Jul-20254.3 KiB189113

constants.cD04-Jul-20255.4 KiB13074

constants.hD04-Jul-20253.4 KiB8940

context.cD04-Jul-20255.9 KiB286217

convolute.cD04-Jul-20254.4 KiB173122

convolute.hD04-Jul-20251.8 KiB499

crt.cD04-Jul-20254.6 KiB17984

crt.hD04-Jul-20251.7 KiB467

difradix2.cD04-Jul-20254.4 KiB17289

difradix2.hD04-Jul-20251.7 KiB478

fnt.cD04-Jul-20252.3 KiB7835

fnt.hD04-Jul-20251.7 KiB478

fourstep.cD04-Jul-20256.1 KiB243154

fourstep.hD04-Jul-20251.7 KiB478

io.cD04-Jul-202543.3 KiB1,6111,140

io.hD04-Jul-20251.9 KiB6224

mpalloc.cD04-Jul-20259 KiB348201

mpalloc.hD04-Jul-20252 KiB5412

mpdecimal.cD04-Jul-2025246.7 KiB9,1566,781

mpdecimal.h.inD04-Jul-202539.4 KiB805694

mpdecimal32vc.hD04-Jul-202542.5 KiB763562

mpdecimal64vc.hD04-Jul-202542.9 KiB769562

mpsignal.cD04-Jul-202522.2 KiB967815

numbertheory.cD04-Jul-20253.5 KiB13070

numbertheory.hD04-Jul-20252.4 KiB7632

sixstep.cD04-Jul-20255.7 KiB213138

sixstep.hD04-Jul-20251.7 KiB478

transpose.cD04-Jul-20257.4 KiB276186

transpose.hD04-Jul-20252 KiB6117

typearith.hD04-Jul-202516.9 KiB662447

umodarith.hD04-Jul-202515.6 KiB646415

vcdiv64.asmD04-Jul-20251.6 KiB4843

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