Skip to content

fft fails for lengths 392, 588, 968, 980 .... (PR#1429)

1 message · Brian Ripley

#
R 1.4.1, Linux and Windows

for(i in 1:1000) {
    X <- rnorm(i)
    XX <- fft(fft(X), inverse=T)/i
    if(max(Mod(XX-X)) > 1e-10) print(i)
}

[1] 392
[1] 588
[1] 968
[1] 980

and I then get a segfault during gc().  The answers are way off, with
imaginary parts 1e10 or more.

These numbers are all multiples of 7^2 or 11^2.

(Based on a report to R-help
Date: Thu, 28 Mar 2002 09:37:34 +0100
From: Gabriel Fricout <Gabriel.FRICOUT@cmm.ensmp.fr>
)