Updates:
        Summary: Should Heaviside raise ValueError if the argument is not real?

Comment #1 on issue 3098 by asmeu...@gmail.com: Should Heaviside raise ValueError if the argument is not real?
http://code.google.com/p/sympy/issues/detail?id=3098

Maple gives an error:

Heaviside(1 + I);
Error, (in Heaviside) not defined for non-real values

The Mathematica docs (http://reference.wolfram.com/mathematica/ref/HeavisideTheta.html) say:

HeavisideTheta cannot be uniquely defined with complex arguments (no Sato hyperfunction interpretation):
In[1]:= HeavisideTheta[1+2I]

Out[1]= HeavisideTheta[1+2I]

So it seems it leaves it unevaluated. I don't know what would happen if you tried to numerically evaluate that.

I think we should do what Maple does.

At any rate, evalf() should recursively evaluate the argument:

In [15]: Heaviside(pi*I).n()
Out[15]: Heaviside(ⅈ⋅π)

By the way, the Mathematica docs also have an interesting note:

PiecewiseExpand does not operate on HeavisideTheta because it is a distribution and not a piecewise-defined function:

This is an interesting approach, which is to model distributions and piecewise functions separately.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to