Ticket #6948: trac_6948-exp_power_print.patch

File trac_6948-exp_power_print.patch, 750 bytes (added by burcin, 13 years ago)
  • sage/symbolic/constants_c.pyx

    # HG changeset patch
    # User Burcin Erocal <burcin@erocal.org>
    # Date 1253773897 -7200
    # Node ID e6022b24fe6c72837e5684ad0c3ebc3a3de7d42d
    # Parent  d825c10e1afed387155ac60eb23fc0e4d78ec57f
    Put parenthesis around exp when printing powers. #6948
    
    diff --git a/sage/symbolic/constants_c.pyx b/sage/symbolic/constants_c.pyx
    a b  
    203203            sage: import sympy
    204204            sage: sympy.E == e # indirect doctest
    205205            True
     206
     207        TESTS::
     208
     209            sage: t = e^a; t
     210            e^a
     211            sage: t^b
     212            (e^a)^b
     213            sage: SR(1).exp()
     214            e
    206215        """
    207216        global exp_one
    208217        exp_one = SR.one_element().exp()