Permalink
Browse files

Added compatibility notes with GMP < 4.2 in the docs

  • Loading branch information...
1 parent 9f24053 commit 7b85bea8d1d61037ebf91ac6efcef7b1614ee6e8 @dvarrazzo committed Apr 22, 2011
Showing with 29 additions and 1 deletion.
  1. +13 −1 docs/install.rst
  2. +5 −0 docs/mpq.rst
  3. +11 −0 docs/mpz.rst
View
@@ -7,7 +7,12 @@ Prerequisites
`!pgmp` is currently compatible with:
- PostgreSQL from version 8.4
-- GMP from version 4.3 (tested with versions 4.3.2 and 5.0.1)
+- GMP from version 4.1 (tested with versions 4.1.4, 4.2.4, 4.3.2 and 5.0.1)
+
+.. note::
+ GMP 4.1 doesn't implement a few functions (`rootrem()`, `combit()`,
+ `randinit_mt()`) and the maximum base accepted by the I/O functions is
+ 36, not 62.
Building the library
@@ -40,6 +45,13 @@ You can test the installation with:
(adjust the :envvar:`REGRESS_OPTS` variable to select a test database).
+.. note::
+ Because of the missing function in GMP 4.1 (see Prerequisites_), a few
+ tests are expected to fail with this library version. After running the
+ test suite you may check the ``regression.diff`` file to verify that the
+ only tests failed are the ones related to the missing functionalities and
+ the different default random numbers gerenator algorithm.
+
Installing the extension
------------------------
View
@@ -66,6 +66,9 @@ operators. Indexes on `!mpq` columns can be created using the *btree* or the
denominator, so for instance ``0xEF/100`` is 239/100, whereas
``0xEF/0x100`` is 239/256.
+ .. note:: The maximum base accepted by GMP 4.1 is 36, not 62.
+
+
.. function:: text(q)
text(q, base)
@@ -81,6 +84,8 @@ operators. Indexes on `!mpq` columns can be created using the *btree* or the
lower-case letters (in that significance order) are used. If *base* is not
specified, 10 is assumed.
+ .. note:: The maximum base accepted by GMP 4.1 is 36, not 62.
+
`!mpq` conversions
------------------
View
@@ -52,6 +52,9 @@ operators. Indexes on `!mpz` columns can be created using the *btree* or the
16 | 10 | 8 | 2
+ .. note:: The maximum base accepted by GMP 4.1 is 36, not 62.
+
+
.. function:: text(z)
text(z, base)
@@ -64,6 +67,8 @@ operators. Indexes on `!mpz` columns can be created using the *btree* or the
lower-case letters (in that significance order) are used. If *base* is not
specified, 10 is assumed.
+ .. note:: The maximum base accepted by GMP 4.1 is 36, not 62.
+
Arithmetic Operators and Functions
----------------------------------
@@ -308,6 +313,8 @@ Root Extraction Functions
------+-----
3 | 1
+ .. note:: The function is not available on GMP version < 4.2.
+
.. function:: sqrt(op)
Return the truncated integer part of the square root of *op*.
@@ -562,6 +569,8 @@ number 0.
Return *op* with bit *bit_index* complemented.
+ .. note:: The function is not available on GMP version < 4.2.
+
.. function:: tstbit(op, bit_index)
Test bit *bit_index* in *op* and return 0 or 1 accordingly.
@@ -590,6 +599,8 @@ and can be seeded with the `randseed()` function.
.. __: http://en.wikipedia.org/wiki/Mersenne_twister
+ .. note:: The function is not available on GMP version < 4.2.
+
.. function:: randinit_lc_2exp(a, c, e)

0 comments on commit 7b85bea

Please sign in to comment.