[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FFT inaccuracy
From: |
Dirk Laurie |
Subject: |
FFT inaccuracy |
Date: |
Thu, 30 Apr 1998 16:20:38 +0200 (SAT) |
>> ifft(fft([1 1 0 0 1]))
ans =
1.0000e+00 1.0000e+00 -1.4682e-08 -1.4682e-08 1.0000e+00
This seems to indicate a lack of accuracy. And indeed, comparison with
the exact value shows
>> fft([1 1 0 0 1])-[3, sin(3*(1:4)*pi/5)./sin((1:4)*pi/5)]
ans =
0.0000e+00 1.6415e-08 -1.6415e-08 -1.6415e-08 1.6415e-08
This suggests some single-precision constant in the radix-5 special case.
The error does not occur with n=7:
>> ifft(fft([1 1 0 0 0 0 1]))
ans =
Columns 1 through 5:
1.0000e-00 1.0000e+00 -7.8064e-16 1.2067e-16 1.2067e-16
Columns 6 and 7:
-7.8064e-16 1.0000e+00
Dirk Laurie
- FFT inaccuracy,
Dirk Laurie <=