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=c1⁢b1+...+cn⁢bn.
The command with(numtheory,nearestp) allows the use of the abbreviated form of this command.
with⁡numtheory:
B≔213,0,0,exp⁡2,1,0,0,π⋅100,1
B≔213,0,0,ⅇ2,1,0,0,100⁢π,1
alp≔7.01,8.01,γ
nearestp⁡B,alp
−36,7,0
b≔−127230625746351104,1,0,9032571691,0,0,−7265292251119526656,4772995,1
blp≔71.01,18.01,π4
nearestp⁡b,blp
2,107,97
See Also
NumberTheory[NearestLatticePoint]
numtheory(deprecated)[kronecker]
numtheory(deprecated)[minkowski]
Download Help Document