New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An algorithm for enumerating elements of bounded height in number fields #15389
Comments
Branch: u/jdoyle/bdd_height |
Commit: |
Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:3
Hi, Good work! There are some things that need to be changed and others that can be improved (not necessarily in this ticket but it might be a good idea to think about it). First of all about syntax and tests:
at the begining of the tests.
About algorithmic
can be replaced by two (much faster) line
And by the way, why do you need to convert the result into tuples?
|
comment:5
Replying to @videlec: Thanks for all your comments! We're working on this. I was wondering if you saw any places where using Cython would speed things up? Regarding point 5: Unfortunately, RDF is often not precise enough for our computations. The polytope we deal with will sometimes have vertices with very small coordinates, so that RDF thinks they are 0, and then things go wrong. Ideally, we would be able to create a polyhedron whose base ring is a real field with any given precision, but as far as I know this is not allowed by the Polyhedron constructor. This is why we first compute the vertices of our polytope with high precision as floating point numbers and then convert them to rational numbers for the polyhedron computation. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Ben Hutz |
comment:12
Mostly minors issues, but there are a few of them. Some general comments first
for the numberfield.py file:
for the bdd_height.py file:
bdd_norm_pr_gens_iq:
bdd_height_iq:
bdd_norm_pr_ideal_gens:
integer_points_in_polytope:
bdd_height:
|
comment:13
Replying to @bhutz:
Maybe you're thinking of logarithmic height? For our height function, 0 has height 1.
Unfortunately, RDF is often not precise enough for our computations. The polytope we deal with will sometimes have vertices with very small coordinates, so that RDF thinks they are 0, and then things go wrong. Ideally, we would be able to create a polyhedron whose base ring is a real field with any given precision, but as far as I know this is not allowed by the Polyhedron constructor. This is why we first compute the vertices of our polytope with high precision as floating point numbers and then convert them to rational numbers for the polyhedron computation. This is not ideal, but otherwise there would be no point in allowing the user to input a precision, since it's going to be cut down to 53 anyway.
It certainly does fail if the precision is not good enough. The issue is that a fundamental unit can have an embedding with very very small absolute value; when we take log of that, RR may interpret this as log(0). If I recall correctly this is ok with RR, but when you try to coerce into QQ it raises an error. |
comment:14
Yes, my mistake, I was thinking logarithmic height. I see now for the precision. Please put a comment right before those tests something like |
Changed branch from u/jdoyle/bdd_height to u/jdoyle/ticket/15389 |
Commit: |
Last 10 new commits:
|
comment:24
Failure on the OSX 10.9 buildbot is reproducable... |
comment:25
I had the same problem with my mac running OS 10.9. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:27
I changed the example that was causing an issue. It seems that the issue may be related to the fact that there are elements in that particular number field of height exactly equal to 100, and perhaps the different machines handled the floating point arithmetic differently. I changed the height bound in the example to 60 because there don't seem to be any elements of height exactly 60. |
comment:28
Does increasing the precision on OSX cause that example to work? It would be nice to know that it really is a precision issue (as mentioned in the warning) and not some other underlying issue. |
comment:29
Yes, on mac osx I increased the precision to 200 bits and got the expected answer (5171). Probably a smaller precision would also work. The same answer is obtained with precision 300, 500, and 1000. |
comment:30
All doctests are passing now on my machine running Mac OS 10.9. |
comment:32
That's resolved as a precision issue then. doc tests pass on my machine. The new examples are good, but the one with 1899 for bdd_height has some trailing whitespace that needs to be removed. After that, I'll mark this positive again. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:35
Long doctests should still take <= 5s. Is there anything that can't be tested by enumerating less than thousands of solutions? Every ticket needs to run the tests, don't slow it down without reason. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:38
Thanks! |
Changed branch from u/jdoyle/ticket/15389 to |
An implementation of the main algorithm in John R. Doyle and David Krumm, Computing algebraic numbers of bounded height, http://arxiv.org/abs/1111.4963 (2013). This will add functionality to determine all elements of small height in any given number field.
CC: @bhutz @videlec @sagetrac-jdoyle
Component: number theory
Keywords: sage-days55
Author: David Krumm, John Doyle
Branch/Commit:
8fed00f
Reviewer: Ben Hutz
Issue created by migration from https://trac.sagemath.org/ticket/15389
The text was updated successfully, but these errors were encountered: