Ticket #9538: trac_9538-maxima_kill.patch

File trac_9538-maxima_kill.patch, 1.0 KB (added by burcin, 12 years ago)
  • sage/symbolic/expression.pyx

    # HG changeset patch
    # User Burcin Erocal <burcin@erocal.org>
    # Date 1285516648 -7200
    # Node ID 070018a668727339a9c43c38ecc30b171c0f9871
    # Parent  c1af00e863a500ab65e3950b708c2e5b8eba3ca1
    trac 9538: test if variables from symbolic summation tests still interfere with calculations in maxima
    
    diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
    a b  
    68746874            Traceback (most recent call last):
    68756875            ...
    68766876            TypeError: unable to convert sqrt(3) to a rational
     6877
     6878        Check if #9538 is fixed::
     6879
     6880            sage: var('f6,f5,f4,x')
     6881            (f6, f5, f4, x)
     6882            sage: e=15*f6*x^2 + 5*f5*x + f4
     6883            sage: res = e.roots(x); res
     6884            [(-1/30*(sqrt(-12*f4*f6 + 5*f5^2)*sqrt(5) + 5*f5)/f6, 1), (1/30*(sqrt(-12*f4*f6 + 5*f5^2)*sqrt(5) - 5*f5)/f6, 1)]
     6885            sage: e.subs(x=res[0][0]).is_zero()
     6886            True
    68776887        """
    68786888        if x is None:
    68796889            x = self.default_variable()