On 2015-04-28 20:59, Nils Bruin wrote:
On Tuesday, April 28, 2015 at 11:25:07 AM UTC-7, Joao Alberto de Faria
wrote:

    The problem is that this issue also occurs for
      R.<x>=Qp(5)[]
    f=x^2
    f.factor(), I was trying to fiddle with it and accidently copied the
    wrong code

its trailing coefficient is 0
No, it's not, the trailing coefficient is O(5^20):

sage: R.<x> = Qp(5)[]
sage: f = x^2
sage: parent(f[0])
5-adic Field with capped relative precision 20

This polynomial could have been an approximation of (x^2 + 5^21), which is irreducible.

Precisely to avoid these issues, polynomials over QQ have a factor_padic() method which assumes that the input is exact:

sage: R.<x> = QQ[]
sage: f = x^2
sage: f.factor_padic(5,20)
((1 + O(5^20))*x + (O(5^20)))^2

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to