Am 09.07.21 um 19:01 schrieb Sven Schreiber:
Hi,
I was going to move the documentation of the Fast Fourier Transform to a
more fitting place in the guide (away from "special functions in genr",
because genr is not really relevant).
Then I noticed that the section is a bit outdated because it doesn't
mention the new complex-yielding function fft2. I can update that.
However, it occurred to me that "fft2" is a problematic name down the
road, just like "coint2" was problematic until it was renamed as
"johansen". Namely the "2" becomes meaningless after fft is gone and
is
only understandable for gretl historians. (I also find it confusing
because there's the library name fftw3 with another digit in the name,
but maybe that part is just me.)
So, how about a new name? (Keeping the existing ones as aliases I'd
say.) Here's a spontaneous list of possibilities:
- fourier() (perhaps along with ifourier() as an alias for ffti()? -
actually quite elegant as a 8-char name...)
Hi Sven,
Initially I liked that function name. However, then I though: "It may be
too general, as some people could think that this functions is supposed
to compute some Fourier frequencies such as seasonality terms."
- fftC(), with the C standing for complex; but maybe not much of an
improvement over the "2"
I don't like the mixture of lower and upper case letters for gretl-built
in function names (we don't have any I think).
- ...or biting the backwards-incompatibility bullet and change the
original fft() to do what fft2() does now. (My quick check doesn't show
any package that uses fft anymore, so no breakage expected there.)
"fft" might be a reasonable name as this abbreviation is well-known I
would say.
Best,
Artur