aboutsummaryrefslogtreecommitdiff
path: root/fft.c
diff options
context:
space:
mode:
Diffstat (limited to 'fft.c')
-rw-r--r--fft.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fft.c b/fft.c
index 923c3fd..89ef38e 100644
--- a/fft.c
+++ b/fft.c
@@ -57,10 +57,10 @@ squares(size_t n)
double *p;
int i;
- p = calloc(n, sizeof(double));
+ p = calloc(n / 2, sizeof(double));
assert(p);
- for (i = 0; i < n; i++)
+ for (i = 0; i < n / 2; i++)
p[i] = sqrt(i + 1);
return p;