#6919: basic arithmetic using FLINT is broken (very serious!)
------------------------------+---------------------------------------------
 Reporter:  was               |       Owner:  somebody  
     Type:  defect            |      Status:  new       
 Priority:  blocker           |   Milestone:  sage-4.1.2
Component:  basic arithmetic  |    Keywords:            
 Reviewer:                    |      Author:            
   Merged:                    |  
------------------------------+---------------------------------------------
 Mariah Lenox reported:
 {{{
 R.<x> = PolynomialRing(ZZ)
 A = 2^(2^17+2^15)  # note the 2 rather than the "s"
 a = A * x^31
 b = (A * x) * x^30
 a == b   # prints "False" ???
 }}}

 But
 {{{
 R.<x> = PolynomialRing(ZZ, implementation='NTL')
 A = 2^(2^17+2^15)  # note the 2 rather than the "s"
 a = A * (x^31)
 b = A * x * (x^30)
 a == b
 }}}
 gives True.  So this is definitely either a bug in FLINT (highly likely),
 or a bug in our wrapper (much less likely, since our wrapper is so
 generic:
 {{{
 cpdef RingElement _mul_(self, RingElement right):
     r"""
     Returns self multiplied by right.

     EXAMPLES::

         sage: R.<x> = PolynomialRing(ZZ)
         sage: (x - 2)*(x^2 - 8*x + 16)
         x^3 - 10*x^2 + 32*x - 32
     """
     cdef Polynomial_integer_dense_flint x = self._new()
     _sig_on
     fmpz_poly_mul(x.__poly, self.__poly,
             (<Polynomial_integer_dense_flint>right).__poly)
     _sig_off
     return x
 }}}
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6919>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to