I have yet to see any mathematical reasoning suggesting that i.0 as a
polynomial should be considered a bug.
That said, I should point out I am not sure I see the relevance of
polynomial degree to your assertion (which, as near as I can tell, is
that an empty polynomial is not a zero polynomial).
Here's an implementation of polynomial degree:
degree=: {{<: +/ +./\. 0 ~: y}}
degree 1 2 1
2
degree 5
0
degree 0
_1
degree i.0
_1
degree 0 0 0 0 0
_1
degree 1 2 1 0 0 0
2
If anything, I think that the concept of polynomial degree shows that
trailing zeros in a polynomial should be irrelevant.
What am I missing?
Thanks,
--
Raul
On Tue, Jan 3, 2023 at 10:51 PM Henry Rich <[email protected]> wrote:
>
> You're right about the integral of (i. 0). I was confused.
>
> The underlying point is still valid, though. (i. 0) is a different
> thing from (0) and there is no strong argument for allowing it as a
> polynomial. A 'polynomial' of (i. 0) is a bug and should be caught as
> soon as possible.
>
> Henry Rich
>
> On 1/3/2023 10:43 PM, Raul Miller wrote:
> > On Tue, Jan 3, 2023 at 10:40 PM Henry Rich <[email protected]> wrote:
> >> What is the integral of (i. 0)?
> > When integrating we add an arbitrary constant to represent the unknown
> > constant which would have been lost during differentiation.
> >
> > By convention, J tends to use 0 to represent arbitrary constants when
> > there's no overriding issue.
> >
> > So here, the integral would either be ,0 or i.0 though of course, any
> > single element numeric list would technically be valid.
> >
> >> If (i. 0) as a polynomial is the same as 0, the answer has to be 0 1,
> >> which is inconsistent with simple definitions.
> > I think you should double check your math here.
> >
> > The integral of ,1 would be 0 1.
> >
> > Thanks,
> >
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm