Hi,

I was surprised to find that there is no is_irreducible() method for 
multi-variate polynomials in Sage. There is an alternative is_prime() 
method for this purpose. But this is very slow:

sage: f.parent()
Multivariate Polynomial Ring in x, y over Finite Field of size 2
sage: f=(x^10+y^10)^2
sage: time f.is_prime()
CPU times: user 33.6 ms, sys: 497 µs, total: 34.1 ms
Wall time: 33.9 ms
False
sage: time sum([e for _,e in f.factor()]) == 1
CPU times: user 307 µs, sys: 34 µs, total: 341 µs
Wall time: 324 µs
False

sage: f=x^9+y^9+1
sage: time sum([e for _,e in f.factor()]) == 1
CPU times: user 832 µs, sys: 118 µs, total: 950 µs
Wall time: 1.64 ms
True
sage: time f.is_prime()
CPU times: user 19.4 ms, sys: 521 µs, total: 19.9 ms
Wall time: 19.8 ms
True

Am I missing something? 



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

Reply via email to