-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
NumberField embedding slightly off #7598
Comments
comment:3
This is probably caused by the roots method using NumPy which uses Fortran which is a little off. If you specify algorithm='pari' to the roots command when computing them, things should be fine.
Note that NumPy is not used for the second example. |
comment:4
Attachment: trac_7598-more_serious_version.patch.gz trac_7598-more_serious_version.patch -- this deals with the problems more at the root. Unfortunately, there are doctests in this file that fail:
and I haven't had time to figure out what is wrong. It probably has to do with a complex embedding not being defined automatically, whereas before it was... The design of embeddings was really bad before and relied on numerical errors to mess up the order of roots in case of 53 bit precision. This was potentially very buggy and was I think the result of some absolutely terrible design decisions. This absolutely must be fixed before releasing sage-4.3. This patch basically fixes it, modulo some small remaining issue. Here is an example from sage-4.2.1 that illustrates just how horrendously bad the previous design was (with using CDF when prec=53 but ComplexField(prec) otherwise):
|
comment:5
I think the errors in dirichlet.py comes from the following:
It'd be nice if the {{{pow}} methods were standardized. |
Attachment: trac_7598-dirichlet.patch.gz |
comment:6
I've added a patch which fixes the errors in dirichlet.py by just forcing the exponent to be an int. William's changes look good to me so the only thing that needs review is trac_7598-dirichlet.patch. We should open another ticket for the |
Author: William Stein |
Reviewer: Mike Hansen |
comment:7
Do we need to apply both patches? Or is it that Mike has given a positive review to the first and only needs a review of the second? I was hoping to test this (being someone who experienced the problems) but as it will take a long time to rebuild, I want to make sure that the time is not wasted. |
comment:8
You need to apply both patches. I've given a positive review to the first. The second is pretty easy since it makes the exponent an integer instead of an integermod. |
comment:9
Running long doctests on a 32-bit Arch Linux machine gives one doctest failure related to this ticket:
Apart from this small issue, everything looks good. |
comment:10
OK, I've added a trivial patch that fixes the last doctest failure. |
Attachment: trac_7598-nf_galois_groups.patch.gz apply after the previous two patches |
comment:12
Applied all 3 patches to 4.3.rc0 on both 32-bit Suse (built using system gfortran) and 64-bit ubuntu (using Sage's gfortran). No problems. All tests in the files touched pass. I still get a failure in doc/en/bordeaux_2008/nf_introduction.rst but that has a different cause. So, positive review. |
Changed reviewer from Mike Hansen to Mike Hansen, John Cremona |
comment:13
Excellent. I'm glad we (you guys) tracked that down. I'm not sure why I didn't think that the number field was just using the alternate embedding. |
Merged: sage-4.3.rc1 |
It should give
1j
instead.CC: @burcin
Component: number fields
Author: William Stein
Reviewer: Mike Hansen, John Cremona
Merged: sage-4.3.rc1
Issue created by migration from https://trac.sagemath.org/ticket/7598
The text was updated successfully, but these errors were encountered: