Peculiar behavior of DiscreteDelta
- To: mathgroup at smc.vnet.net
- Subject: [mg28731] Peculiar behavior of DiscreteDelta
- From: Jack Goldberg <jackgold at math.lsa.umich.edu>
- Date: Fri, 11 May 2001 03:38:48 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I am using Mathematica, version 4.0 on a Mac OS.9 system and a Unix system. On
both systems I get the following peculiar buglet:
results in a message entitled $MaxExtraPrecision::meprecp : ...
and an output which is identical to the input. This does not happen if
DiscreteDelta is replaced by a numeric function such as Sin. This led me
to note that
* DiscreteDelta does not have the Attribute NumericFunction.
Back to the main point:
If the output of In is followed by FullSimplify, then we get 1 which is
expected since the argument of DiscreteDelta is 0. If Sqrt is replaced
by other Sqrt[n] where n is not a perfect square, the result is again the
message and the input is returned unaltered. However if Sqrt is
replaced by Sqrt[r] (where r is symbolic) the input is returned unaltered
with no message.
Since DiscreteDelta is not an oft used function, my guess is that Wolfram
will not get around to fixing this for some time. While I wait, I would
like to write a "work around".
** I define a pseudo DiscreteDelta say JackDelta[x] which, like
DiscreteDelta, gives 0 if the argument is not 0 and 1 otherwise. (That is,
JackDelta = 1;
JackDelta[x_?NumericQ] = 0;
returns 1. I am delighted but very puzzled.
Well experts, what's up?
(1) Why doesn't
return 0. (It returns the input unaltered)
(2) Why does
return 0. In view of (1), it should!
(3) Why does
have an error message associated with it.
(4) Why does Mathematica have a different response for each of these calls?
These things drive me nuts.
Prev by Date:
Next by Date:
Help optimizing a slow integral
Previous by thread:
Next by thread:
Re: Peculiar behavior of DiscreteDelta