Skip to content

close_vectors for Float64 vectors #4139

Answered by thofma
Lucatil asked this question in Q&A
Discussion options

You must be logged in to vote

Our support for floating point numbers is lacking (and I am not sure it will improve). It works if you supply rational numbers instead:

julia> x = [1//2; 1//2];

julia> CV = close_vectors(L, x, 4)
12-element Vector{Tuple{Vector{ZZRingElem}, QQFieldElem}}:
 ([1, 2], 5//2)
 ([0, 2], 5//2)
 ([2, 1], 5//2)
 ([1, 1], 1//2)
 ([0, 1], 1//2)
 ([-1, 1], 5//2)
 ([2, 0], 5//2)
 ([1, 0], 1//2)
 ([0, 0], 1//2)
 ([-1, 0], 5//2)
 ([1, -1], 5//2)
 ([0, -1], 5//2)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Lucatil
Comment options

Answer selected by Lucatil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants