Overview of the IntegerRelations Package - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Packages : IntegerRelations

Overview of the IntegerRelations Package

Calling Sequence





The IntegerRelations package contains two routines, LLL, and PSLQ, which are used to solve specific computational problems. LLL is the Lenstra, Lenstra, Lovasz lattice basis reduction. PSLQ is Bailey and Ferguson's partial sum of least squares algorithm. The LinearDependency routine is a user-level routine for applying PSLQ or LLL to solve the integer relation problem, defined as follows.


Given decimal approximations for n real or complex numbers x1,x2,...,xn, find an integer relation between them, that is, find integers u1,u2,...,un such that u1x1+u2x2+...+unxn is small, if such ui exist.

The identify Command  and the IntegerRelations Package


The identify command uses the LLL and PSLQ routines to identify exact constants from decimal numbers, for example, given x=4.555806216,identifyx outputs π+2


The process is described as follows. Consider x=2.414213562. The identify command first tests if x is close to a small rational constant. Next identify tests if x is close to an algebraic number. To do this, identify first tests if x is a root of a quadratic polynomial.  It computes PSLQ1,x,x2.  PSLQ outputs 1,2,1 an integer relation with small integer coefficients satisfying x22x1=11000000000, which is small.  From this relation you have the minimal polynomial for x, namely x22x1. The identify command then solves for x to obtain x=1+2 from which it determines that x=1+2. The algorithms in the identify routine can find other relations, for example:




Digits := 20;



x := 0.31783724519578224473;






solve(y^4-10*y^2+1, y);






Each command in the IntegerRelations package can be accessed by using either the long form or the short form of the command name in the command calling sequence.


As the underlying implementation of the IntegerRelations package is a module, it is also possible to use the form IntegerRelations:-command to access a command from the package. For more information,  see Module Members.

List of IntegerRelations Package Commands


The following is a list of available commands.






To display the help page for a particular IntegerRelations command, see Getting Help with a Command in a Package.

See Also

help, identify, module, PolynomialTools[MinimalPolynomial], UsingPackages, with

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam