readme 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. Readme for libgmp.tar.bz2 2009-09-06
  2. = What
  3. Free Pascal interface for the GNU Multiple Precision Arithmetic Library.
  4. = Why
  5. Numeric computing outside the built in types range. AFAIK there is no complete
  6. binding for Free Pascal available yet.
  7. = Files
  8. - gmp_accept_test.pas
  9. "Go/no go" test of the gmp unit against the GMP library on your system.
  10. - gmp.pas
  11. The interface unit.
  12. - gmp_testcase.pas
  13. Put this unit in your uses clause of a fpcunit project.
  14. - gmp_test_impl.inc
  15. - gmp_test_intf.inc
  16. Test classes declarations and implementations. Included by:
  17. * gmp_accept_test.pas
  18. * gmp_testcase
  19. - pidigits_example.pas
  20. Original source from:
  21. shootout.alioth.debian.org/u64/benchmark.php?test=pidigits&lang=fpascal&id=2
  22. Adapted for using the gmp unit.
  23. - pidigits_example2.pas
  24. Modified pidigits_example.pas to demonstrate usage of the gmp extensions.
  25. - printf_example.pas
  26. Demo using the GMP printf
  27. - printf_example2.pas
  28. Dtto with gmp extensions.
  29. - scanf_example.pas
  30. Demo using the GMP scanf.
  31. - scanf_example2.pas
  32. Dtto with gmp extensions.
  33. = Status
  34. - Tested on 64 and 32 bit Linux and on 32 bit Windows.
  35. - Known issues
  36. * There is a link error on Windows with the GMP global variables.
  37. Probably could be solved with someone's better knowledge of the Windows
  38. environment.
  39. = Bindings
  40. - Standard
  41. * Almost full (see comments in gmp.pas) binding of the types and functions
  42. exported from libgmp.
  43. - Extensions
  44. * Based on pseudo value types (in fact interface types) with an automatic
  45. memory management in the spirit of Object Pascal strings - compiler takes
  46. care of initialization/finalization. Copy on write semantics. Can intermix
  47. the standard binding/types with the extended ones. The extended types have
  48. access to a same set of numeric functions as in the standard binding.
  49. - Operators
  50. * Overloaded operators for the extensions value types. Can make programs
  51. significantly more readable/maintainable. See and compare for yourself
  52. in the pidigits examples. BTW, the overhead in this example with
  53. the extended types and operators is less than 10%. Unusable for shootout,
  54. but is probably acceptable in many other areas.
  55. = Tips
  56. - range checks
  57. You should probably want to put asserts with *_fits before conversion to
  58. FPC ordinal types - applies to the assignment operator too.
  59. = License
  60. - FPC developers, you can do anything you see appropriate with the sources.
  61. Review, refactor and/or reject :-)
  62. = Windows
  63. I got the examples running under win32 by getting the mingw-dynamic package
  64. on
  65. http://cs.nyu.edu/exact/core/gmp/
  66. and then renaming it to gmp.dll