9
$\begingroup$

Is there any reason why DiracDelta isn't a NumericFunction but DiracComb is?

I just ate a bug because of that inconsistency

$\endgroup$
1
  • $\begingroup$ UndirectedEdge has the same problem. $\endgroup$
    – Murta
    Aug 24, 2013 at 12:47

1 Answer 1

6
$\begingroup$

You're right, applying FullDefinition I see that DiracDelta lacks the NumericFunction attribute. And indeed, NumericQ[DiracComb[1]] yields True whereas NumericQ[DiracDelta[0]] doesn't.

Although I'm not sure why that difference exists, you may perhaps be able to get the desired result (you didn't say what your bug was) by setting SetAttributes[DiracDelta, NumericFunction]. At least it then allows you to work with the knowledge that NumericQ[DiracDelta[0]] is True.

Actually, maybe it would be more correct to remove the NumericFunction from both... depends on what you want, I guess.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.