Ticket #13770: trac_13770.patch

File trac_13770.patch, 1.1 KB (added by zimmerma, 8 years ago)
  • sage/rings/polynomial/multi_polynomial_libsingular.pyx

    # HG changeset patch
    # User Paul Zimmermann <zimmerma@loria.fr>
    # Date 1377328440 -7200
    # Node ID 668b59c25ee773dbec114d37c751eae1d8f139e5
    # Parent  8c4989a7e8d20a16ad1c464620ee616c4cde719a
    #13770: bug in multivariate factorization over prime fields
    
    diff --git a/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/sage/rings/polynomial/multi_polynomial_libsingular.pyx
    a b  
    40044004            sage: factor(p*q)
    40054005            (x^2 + y^2 + x + 1) * (x^4 + x^2*y^2 + y^4 + x*y^2 + x^2 + y^2 + 1)
    40064006
     4007        Check that :trac:`13770` is fixed::
     4008
     4009            sage: U.<y,t> = GF(2)[]
     4010            sage: f = y*t^8 + y^5*t^2 + y*t^6 + t^7 + y^6 + y^5*t + y^2*t^4 + y^2*t^2 + y^2*t + t^3 + y^2 + t^2
     4011            sage: l = f.factor()
     4012            sage: l[0][0]==t^2 + y + t + 1 or l[1][0]==t^2 + y + t + 1
     4013            True
     4014
    40074015        The following used to sometimes take a very long time or get
    40084016        stuck, see :trac:`12846`. These 100 iterations should take less
    40094017        than 1 second::