Ticket #13237: 13237_tests.patch

File 13237_tests.patch, 1.7 KB (added by jdemeyer, 9 years ago)

Additional patch

  • sage/rings/polynomial/multi_polynomial_libsingular.pyx

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1346063317 -7200
    # Node ID f79082281f5213ae0c5a2e0648753399f25d06a6
    # Parent  548303d574664f52f1ca5c7c808233edac09db6c
    Add various regression tests
    
    diff --git a/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/sage/rings/polynomial/multi_polynomial_libsingular.pyx
    a b  
    39733973            sage: f=p*q
    39743974            sage: f-f.factor()
    39753975            0
     3976
     3977        The following examples used to give a Segmentation Fault, see
     3978        :trac:`12918` and :trac:`13129`::
     3979
     3980            sage: R.<x,y> = GF(2)[]
     3981            sage: f = x^6 + x^5 + y^5 + y^4
     3982            sage: f.factor()
     3983            x^6 + x^5 + y^5 + y^4
     3984            sage: f = x^16*y + x^10*y + x^9*y + x^6*y + x^5 + x*y + y^2
     3985            sage: f.factor()
     3986            x^16*y + x^10*y + x^9*y + x^6*y + x^5 + x*y + y^2
     3987
     3988        Test :trac:`12928`::
     3989
     3990            sage: R.<x,y> = GF(2)[]
     3991            sage: p = x^2 + y^2 + x + 1
     3992            sage: q = x^4 + x^2*y^2 + y^4 + x*y^2 + x^2 + y^2 + 1
     3993            sage: factor(p*q)
     3994            (x^2 + y^2 + x + 1) * (x^4 + x^2*y^2 + y^4 + x*y^2 + x^2 + y^2 + 1)
     3995
     3996        The following used to sometimes take a very long time or get
     3997        stuck, see :trac:`12846`. These 100 iterations should take less
     3998        than 1 second::
     3999
     4000            sage: K.<a> = GF(4)
     4001            sage: R.<x,y> = K[]
     4002            sage: f = (a + 1)*x^145*y^84 + (a + 1)*x^205*y^17 + x^32*y^112 + x^92*y^45
     4003            sage: for i in range(100):
     4004            ...       assert len(f.factor()) == 4
    39764005        """
    39774006        cdef ring *_ring = self._parent_ring
    39784007        cdef poly *ptemp