Ticket #1174: trac-1174-part3.patch

File trac-1174-part3.patch, 797 bytes (added by was, 11 years ago)
  • sage/calculus/calculus.py

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1196630121 28800
    # Node ID 466d8482b6eae7969c48b58c8044d509f5be8df3
    # Parent  9683a9f27c7866987ccb131ace38475efdb3f3ee
    trac-1174 -- part 3
    
    diff -r 9683a9f27c78 -r 466d8482b6ea sage/calculus/calculus.py
    a b class PrimitiveFunction(SymbolicExpressi 
    41144114            TypeError: unable to simplify to complex approximation
    41154115        """
    41164116        if x.imag == 0:
    4117             return self._approx_(x.real)
     4117            return complex(self._approx_(x.real))
    41184118        s = '%s(%s+%s*%%i), numer'%(self._repr_(), x.real, x.imag)
    41194119        a = maxima.eval(s).replace('%i', '1j')
    41204120        if '(' in a: