fpc/packages/gmp
marco 74aff88586 --- Merging r49045 into '.':
C    Makefile
C    Makefile.fpc
--- Recording mergeinfo for merge of r49045 into '.':
 U   .
Summary of conflicts:
  Text conflicts: 2

# revisions: 49045
r49045 | jonas | 2021-03-24 15:33:09 +0100 (Wed, 24 Mar 2021) | 1 line
Changed paths:
   M /trunk/Makefile
   M /trunk/Makefile.fpc

  * support building with FPC 3.2.2

git-svn-id: branches/fixes_3_2@49384 -
2021-05-20 20:03:52 +00:00
..
examples Regenerate all Makefile's after ios introduction and macos->macosclassic changes inside utils/fpcm/fpcmake.ini 2020-09-23 09:47:20 +00:00
src --- Merging r39866 into '.': 2018-12-11 21:19:56 +00:00
fpmake.pp --- Merging r49045 into '.': 2021-05-20 20:03:52 +00:00
Makefile --- Merging r49045 into '.': 2021-05-20 20:03:52 +00:00
Makefile.fpc --- Merging r49045 into '.': 2021-05-20 20:03:52 +00:00
Makefile.fpc.fpcmake --- Merging r49045 into '.': 2021-05-20 20:03:52 +00:00
readme

Readme for libgmp.tar.bz2 2009-09-06

= What

  Free Pascal interface for the GNU Multiple Precision Arithmetic Library.

= Why

  Numeric computing outside the built in types range. AFAIK there is no complete
  binding for Free Pascal available yet.

= Files

  - gmp_accept_test.pas
    "Go/no go" test of the gmp unit against the GMP library on your system.

  - gmp.pas
    The interface unit.

  - gmp_testcase.pas
    Put this unit in your uses clause of a fpcunit project.

  - gmp_test_impl.inc
  - gmp_test_intf.inc
    Test classes declarations and implementations. Included by:
    * gmp_accept_test.pas
    * gmp_testcase

  - pidigits_example.pas
    Original source from:
    shootout.alioth.debian.org/u64/benchmark.php?test=pidigits&lang=fpascal&id=2
    Adapted for using the gmp unit.

  - pidigits_example2.pas
    Modified pidigits_example.pas to demonstrate usage of the gmp extensions.

  - printf_example.pas
    Demo using the GMP printf

  - printf_example2.pas
    Dtto with gmp extensions.

  - scanf_example.pas
    Demo using the GMP scanf.

  - scanf_example2.pas
    Dtto with gmp extensions.

= Status
  - Tested on 64 and 32 bit Linux and on 32 bit Windows.
  - Known issues
    * There is a link error on Windows with the GMP global variables.
      Probably could be solved with someone's better knowledge of the Windows
      environment.

= Bindings
  - Standard
    * Almost full (see comments in gmp.pas) binding of the types and functions
      exported from libgmp.

  - Extensions
    * Based on pseudo value types (in fact interface types) with an automatic
      memory management in the spirit of Object Pascal strings - compiler takes
      care of initialization/finalization. Copy on write semantics. Can intermix
      the standard binding/types with the extended ones. The extended types have
      access to a same set of numeric functions as in the standard binding.

  - Operators
    * Overloaded operators for the extensions value types. Can make programs
      significantly more readable/maintainable. See and compare for yourself
      in the pidigits examples. BTW, the overhead in this example with
      the extended types and operators is less than 10%. Unusable for shootout,
      but is probably acceptable in many other areas.

= Tips
  - range checks
    You should probably want to put asserts with *_fits before conversion to
    FPC ordinal types - applies to the assignment operator too.

= License
  - FPC developers, you can do anything you see appropriate with the sources.
    Review, refactor and/or reject :-)

= Windows

I got the examples running under win32 by getting the mingw-dynamic package
on

http://cs.nyu.edu/exact/core/gmp/

and then renaming it to gmp.dll