Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!dog.ee.lbl.gov!pasteur!mowlavi.berkeley.edu!splin From: splin@mowlavi.berkeley.edu (Steven Lin) Newsgroups: comp.lang.c Subject: Numerical Recipes: Error in Chapter 12? Message-ID: <11617@pasteur.Berkeley.EDU> Date: 2 Mar 91 20:34:48 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: splin@mowlavi.berkeley.edu (Steven Lin) Organization: U.C. Berkeley -- ERL Lines: 20 Is the definition of the Fourier transform, (12.0.1), (12.0.3), (12.1.7), and elsewhere throughout the entire chapter incorrect? Specifically, the exponential terms in (12.0.1) should be switched. I discovered this error while trying out their fft routine, four1 on page 411. The routine implements (12.1.7) correctly, but (12.1.7) is not the correct or, at least, standard definition of the DFT. You can get four1 to implement the DFT correctly by changing one line from theta=6.28318530717959/(isign*mmax); to theta=-6.28318530717959/(isign*mmax); This change must also be done to the other FFT routines within that chapter. I discovered these errors in a 1990 reprint. If I am incorrect, please tell me. Redirection to the proper newsgroup would also be appreciated.