README.txt 3.6 KB

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