Warning while working with algebraic numbers
sage: R1.<x> = AA[]
....: v = QQbar.polynomial_root(AA.common_polynomial(x^2  x + 1), CIF(RIF(0.5),
....: RIF(RR(0.86602540378443871), RR(0.8660254037844386))))
....: R2.<s> = QQbar[]
....: a = QQbar.polynomial_root(AA.common_polynomial((4*v + 2)*s + (v  1/2))
....: , CIF(RIF(RR(0.24999999999999997), RR(0.25000000000000006)), RIF(RR(0))))
sage: a.exactify()
/home/marc/opt/sage/local/lib/python2.7/sitepackages/sage/rings/number_field/number_field.py:1649: UserWarning: interpreting PARI polynomial 1 relative to the defining polynomial x^2  x + 1 of the PARI number field
% (x, self.pari_polynomial()))
/home/marc/opt/sage/local/lib/python2.7/sitepackages/sage/rings/number_field/number_field.py:1649: UserWarning: interpreting PARI polynomial 4 relative to the defining polynomial x^2  x + 1 of the PARI number field
% (x, self.pari_polynomial()))
Change History (8)
Authors: 
→ Marc Mezzarobba

Branch: 
→ u/mmezzarobba/ticket/22202

Cc: 
Peter Bruin added

Commit: 
→ 234ef6efb9cd4003441c56790944a4fdf9735f0f

Status: 
new →
needs_review

Commit: 
234ef6efb9cd4003441c56790944a4fdf9735f0f →
2fc32f8d39de2009a1bbf0717ff6a11602a8a12c

Status: 
needs_review →
positive_review

Reviewers: 
hwsmith →
Hanson Smith

Branch: 
u/mmezzarobba/ticket/22202 →
2fc32f8d39de2009a1bbf0717ff6a11602a8a12c

Resolution: 
→ fixed

Status: 
positive_review →
closed

Fixed by disabling the warning when the pari and sage polynomials only differ by their variable names... but I really don't know if that's the right thing to do.
New commits:
Fix warning when converting number field elements from pari...