# 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 
3893  3893  def __complex__(self): 
3894  3894  f = self._operands[0] 
3895  3895  g = self._operands[1] 
3896   return complex(f._approx_(float(g))) 
 3896  return complex(f._approx_(complex(g))) 
3897  3897  
3898  3898  def _mpfr_(self, field): 
3899  3899  """ 
… 
… 
class Function_erf(PrimitiveFunction): 
4048  4048  r""" 
4049  4049  The error function, defined as $\text{erf}(x) = 
4050  4050  \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. 
4051  4054  """ 
4052  4055  
4053  4056  def _repr_(self, simplify=True): 