Ticket #7334: trac-7334-logcontract.patch

File trac-7334-logcontract.patch, 975 bytes (added by whuss, 11 years ago)
  • sage/symbolic/expression.pyx

    # HG changeset patch
    # User Wilfried Huss <huss@finanz.math.tugraz.at>
    # Date 1256750407 -3600
    # Node ID 5feef158c8972e15443796d1576bc0dbcdf9a468
    # Parent  0a1f79dbf6b5830bc88c055238e14deb59b21f63
    Use logcontract in simplify_log
    
    diff -r 0a1f79dbf6b5 -r 5feef158c897 sage/symbolic/expression.pyx
    a b  
    52175217            sage: f = (e^x-1)/(1+e^(x/2))
    52185218            sage: f.simplify_exp()
    52195219            e^(1/2*x) - 1
     5220
     5221        ::
     5222
     5223            sage: f = log(sqrt(2) - 1) + log(sqrt(2) + 1)
     5224            sage: f.simplify_log()
     5225            0
     5226
    52205227        """
    52215228        from sage.calculus.calculus import maxima
    52225229        maxima.eval('domain: real$')
    5223         res = self.parent()(self._maxima_().radcan())
     5230        res = self.parent()(self._maxima_().logcontract().radcan())
    52245231        maxima.eval('domain: complex$')
    52255232        return res
    52265233