Ticket #1174: 7349.patch

File 7349.patch, 1.0 KB (added by was, 12 years ago)
  • sage/calculus/calculus.py

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1195112741 0
    # Node ID ff370431ee3a86a0945cb30c6d54571a6467ca5b
    # Parent  71c7312c77510f821b11391e52cf711769d35beb
    Fix tiny bug in calculus coercion to complex.
    
    diff -r 71c7312c7751 -r ff370431ee3a sage/calculus/calculus.py
    a b class SymbolicComposition(SymbolicOperat 
    38933893    def __complex__(self):
    38943894        f = self._operands[0]
    38953895        g = self._operands[1]
    3896         return complex(f._approx_(float(g)))
     3896        return complex(f._approx_(complex(g)))
    38973897
    38983898    def _mpfr_(self, field):
    38993899        """
    class Function_erf(PrimitiveFunction): 
    40484048    r"""
    40494049    The error function, defined as $\text{erf}(x) =
    40504050    \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2} dt$.
     4051
     4052    SAGE currently *only* implements the error function (via a call to
     4053    PARI) when the input is real.
    40514054    """
    40524055
    40534056    def _repr_(self, simplify=True):