Opened 6 years ago

Closed 5 years ago

#22202 closed defect (fixed)

Warning while working with algebraic numbers

Reported by: Marc Mezzarobba Owned by:
Priority: major Milestone: sage-7.6
Component: commutative algebra Keywords:
Cc: Peter Bruin Merged in:
Authors: Marc Mezzarobba Reviewers: Hanson Smith
Report Upstream: N/A Work issues:
Branch: 2fc32f8 (Commits, GitHub, GitLab) Commit: 2fc32f8d39de2009a1bbf0717ff6a11602a8a12c
Dependencies: Stopgaps:

Status badges

Description

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/site-packages/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/site-packages/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)

comment:1 Changed 6 years ago by Marc Mezzarobba

Authors: Marc Mezzarobba
Branch: u/mmezzarobba/ticket/22202
Cc: Peter Bruin added
Commit: 234ef6efb9cd4003441c56790944a4fdf9735f0f
Status: newneeds_review

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:

234ef6eFix warning when converting number field elements from pari...

comment:2 Changed 6 years ago by Vincent Delecroix

Could you find a doctest involving only number fields?

comment:3 Changed 6 years ago by Manuel Kauers

An example only involving number fields:

  y = QQ['y'].gen()
  R = QQ.extension(y^2-2,'a')['x']
  R("a*x").factor()

comment:4 Changed 6 years ago by git

Commit: 234ef6efb9cd4003441c56790944a4fdf9735f0f2fc32f8d39de2009a1bbf0717ff6a11602a8a12c

Branch pushed to git repo; I updated commit sha1. New commits:

2fc32f8#22202: add simpler test

comment:5 Changed 6 years ago by Hanson Smith

Status: needs_reviewpositive_review

comment:6 Changed 6 years ago by Hanson Smith

Reviewers: hwsmith

comment:7 Changed 6 years ago by Hanson Smith

Reviewers: hwsmithHanson Smith

comment:8 Changed 5 years ago by Volker Braun

Branch: u/mmezzarobba/ticket/222022fc32f8d39de2009a1bbf0717ff6a11602a8a12c
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.