numtheory(deprecated)
nearestp
the nearby lattice point problem
Calling Sequence
Parameters
Description
Examples
nearestp(B, alpha)
B
-
list of lists of real numbers (the basis of the lattice)
alpha
list of real numbers (a given point)
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[NearestLatticePoint] instead.
In the lattice given by the basis B, the nearestp command returns a vector w that is near the vector alpha. The vector w will be a nearest vector to alpha in the lattice in the following sense:
There is a constant K depending only on n, the dimension of the lattice, such that for every other vector u in the lattice given by B,
|w - alpha| <= C_n |u - alpha|.
The output of the nearestp command is of the form:
C=[c1,...,cn].
which is a list of integers such that
w=c1b1+...+cnbn.
The command with(numtheory,nearestp) allows the use of the abbreviated form of this command.
withnumtheory:
B≔213,0,0,exp2,1,0,0,π⋅100,1
B≔213,0,0,ⅇ2,1,0,0,100π,1
alp≔7.01,8.01,γ
nearestpB,alp
−36,7,0
b≔−127230625746351104,1,0,9032571691,0,0,−7265292251119526656,4772995,1
blp≔71.01,18.01,π4
nearestpb,blp
2,107,97
See Also
NumberTheory[NearestLatticePoint]
numtheory(deprecated)[kronecker]
numtheory(deprecated)[minkowski]
Download Help Document