You are essentially saying that ((i. 0) p. y) should be defined the same
as (0 p. y). I see no justification for this. We don't treat (i. 0) as
identical to (0). (i. 0) is not a polynomial and trying to make it one
is a kludge that will come to grief. I think it already has:
What is the integral of (i. 0)?
If (i. 0) as a polynomial is the same as 0, the answer has to be 0 1,
which is inconsistent with simple definitions.
It is not always a good thing to expand the domain of a verb. If you
expanded the domain of + to include characters, there would be fewer
errors but much more gnashing of teeth by users. I say that if a user
thinks that x is a polynomial and x is empty, they have a bug and the
sooner they learn that, the better.
Henry Rich
On 1/3/2023 5:06 PM, Raul Miller wrote:
In J807:
(i.0) p. 2
0
In the current j904 beta:
(i.0) p. 2
|domain error, executing dyad p.
|polynomial may not be empty
| (i.0) p.2
I think this change should be reverted.
I have not researched the full history of this change, but J
polynomials may be padded with an arbitrary number of trailing zeros
without changing their significance. So, mathematically speaking,
empty polynomials should be within the domain of the p. verb.
But, also, this breaks typical general case implementation of a
derivative operation on polynomials. In other words, this worked fine
under j807:
pderiv=: 1 }. (* i.@#)
(pderiv 5) p. 2
0
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm