Ticket #13587: trac_13587-infinity_doctest.patch

File trac_13587-infinity_doctest.patch, 928 bytes (added by burcin, 9 years ago)
  • sage/symbolic/expression.pyx

    # HG changeset patch
    # User Burcin Erocal <burcin@erocal.org>
    # Date 1353292674 -3600
    # Node ID 20481e6d8930d947b1bb525e6411b1ec4bac4cff
    # Parent  fb519dd7a2f0d98c3ccc709135d181e22c7b2a3e
    trac 13587: Add doctest for pynac fix of arithmetic with infinity problem.
    
    This patch adds doctests for Pynac issue #14
    
    http://hg.pynac.org/pynac/issue/14/expairseq-constructor-cancels-infinity
    
    diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
    a b  
    37743774
    37753775            sage: exp(x).subs(x=log(x))
    37763776            x
     3777
     3778        Check if :trac:`13587` is fixed::
     3779
     3780            sage: t = tan(x)^2 - tan(x)
     3781            sage: t.subs(x=pi/2)
     3782            Infinity
     3783            sage: u = gamma(x) - gamma(x-1)
     3784            sage: u.subs(x=-1)
     3785            Infinity
    37773786        """
    37783787        cdef dict sdict = {}
    37793788        if in_dict is not None: