Hacker News new | ask | show | jobs
by jhgb 1904 days ago
> there will be a sensible way to define the zero/empty case. This is often a good test of whether you have a uniform concept that works for all n without corner cases.

And so, begun the array indexing war has.

1 comments

A polynomial always includes a member (monomial) with the power zero. It seems natural, therefore, to index the coefficients correspondingly. In other situations, 1 may be the more natural starting index.
The useful corner case/"neutral element" for array indexing is the zero-width interval in an arbitrary position.
Fourier coefficients need a zeroth element too.