-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
I reached out to Ben via email, and he suggested that I open an issue regarding the following.
My question is: shouldn’t the tmp section inside the twiddle function use the formula 0.0 - 2.0 * PI * i / size to calculate a twiddle factor, instead of 0.0 - PI * i / size?
Here’s the function I’m referring to:
https://github.com/DynamicsAndNeuralSystems/catch22/blob/main/C/fft.c
void twiddles(cplx a[], int size)
{
double PI = 3.14159265359;
for (int i = 0; i < size; i++) {
// cplx tmp = { 0, -PI * i / size };
#if defined(__GNUC__) || defined(__GNUG__)
cplx tmp = 0.0 - PI * i / size * I;
#elif defined(_MSC_VER)
cplx tmp = {0.0, -PI * i / size };
#endif
a[i] = cexp(tmp);
//a[i] = cexp(-I * M_PI * i / size);
}
}
Thank you in advance for your clarification. I really appreciate it. Also, thanks for creating such an amazing package; it has been incredibly helpful.
Metadata
Metadata
Assignees
Labels
No labels