• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Random/H12-Nov-2021-541417

V/H12-Nov-2021-13786

t/H12-Nov-2021-4,2823,363

CHANGESH A D12-Nov-20216.4 KiB161136

GMPq.pmH A D12-Nov-202110.9 KiB305244

GMPq.podH A D12-Nov-202128.2 KiB718574

GMPq.xsH A D12-Nov-202193.4 KiB3,6942,977

MANIFESTH A D12-Nov-2021687 4241

META.jsonH A D12-Nov-20211.2 KiB5150

META.ymlH A D12-Nov-2021669 2726

Makefile.PLH A D12-Nov-20212.2 KiB7552

READMEH A D12-Nov-20212.1 KiB6644

math_gmpq_include.hH A D12-Nov-20213.5 KiB12169

typemapH A D12-Nov-2021390 1816

README

1This module wraps all of the 'mpq' (rational) functions that
2the Gnu MP (GMP) library provides. It requires gmp-4.2.0 or later.
3
4You therefore need the GMP library installed on your computer. See:
5https://gmplib.org/
6
7To build this module you need perl 5.6.0 or later. I'm not sure of all
8the requirements to get it to build with earlier versions of perl, but
9it's definite that the XS code relating to operator overloading will
10not compile with perl versions prior to 5.6.
11
12No OO interface - just plain access to GMP's rational number functions.
13
14Build in the usual way:
15
16 perl Makefile.PL
17 make
18 make test
19 make install
20
21When building this module, the GMP library will need to be accessible.
22If it's in a location where your compiler does not find it by default,
23then instead of running 'perl Makefile.PL', you'll need to run:
24
25perl Makefile.PL INC="-I/path/to/gmp_include" LIBS="-L/path/to/gmp_lib -lgmp"
26
27==============
2864-bit support
29==============
30
31If your perl's Config reports that 'ivsize' is greater than or
32equal to 8 && 'ivtype' is not 'long', then Math::GMPq will, by
33default, be built to enable you to use the 64-bit long long int
34values with the new() function and the overloaded operators.
35
36
37Similarly, if your perl's Config reports that 'nvsize' > 8,
38then Math::GMPq will, by default, be built to enable you to use the
39larger precision values (be they either 'long double' or '__float128'
40with the new() function and the overloaded operators.
41
42I am contactable by email at sisyphus at(@) cpan dot (.) org.
43
44==========
45MAC OS X
46==========
47
48If you have MacPorts installed, you may need to install gmp +universal
49for the bindings to work. After installing you'll need to run:
50
51perl Makefile.PL INC="-I/opt/local/include" LIBS="-L/opt/local/lib -lgmp"
52
53==========
54MS WINDOWS
55==========
56If building with an MSVC++ compiler against a MinGW-built gmp lib, you'll
57need to additionally link to MinGW's libgcc.a and libcoldname.a. First,
58create copies of the 3 '.a' files (named libgmp.lib, libgcc.lib, and
59libcoldname.lib) and then run:
60
61perl Makefile.PL INC="-IC:/path/to/gmp_include" LIBS="-LC:/path/to/gcc_lib -lgcc -LC:/path/to/coldname_lib -lcoldname -LC:/path/to/gmp_lib -lgmp"
62
63
64
65
66