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 > Right. That particular polynomial looks like it can't be confused with an irreducible one, but that's a special case because its trailing coefficient is 0, and the code doesn't special case that. But you should really think of that polynomial as
sage: f+1-1 (1 + O(5^20))*x^2 + (O(5^20)) which could be an approximation to any one of (1 + O(5^40))*x^2 + (-1*5^20+O(5^40)) #which is reducible (1 + O(5^40))*x^2 + (2*5^20+O(5^40)) #which is irreducible (1 + O(5^40))*x^2 + (1*5^21+O(5^40)) #which is irreducible for a different reason so if a polynomial isn't obviously square free, deciding its factorization is numerically unstable. Sage apparently opts to not guess. If you have reason to believe that you have enough precision to tell the multiplicities of factors in its factorization then you should proceed exactly as you did: take the square-free part, factor that, and figure out the multiplicities of the factors. Sage's reluctance to do that for you is perhaps inconvienent and possibly not the best user interface choice, but it's certainly defensible. -- 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.