Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!davis From: davis@pacific.mps.ohio-state.edu ("John E. Davis") Newsgroups: comp.lang.c Subject: Re: Numerical Recipes: Error in Chapter 12? Message-ID: Date: 6 Mar 91 05:51:47 GMT References: <11617@pasteur.Berkeley.EDU> Sender: news@pacific.mps.ohio-state.edu Reply-To: davis@pacific.mps.ohio-state.edu (John E. Davis) Organization: "Dept. of Physics, The Ohio State University" Lines: 25 In-reply-to: splin@mowlavi.berkeley.edu's message of 2 Mar 91 20:34:48 GMT In article <11617@pasteur.Berkeley.EDU> splin@mowlavi.berkeley.edu (Steven Lin) writes: 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 [...] There is nothing wrong with the routines-- it is just convention. In fact, their convention is the one that is usually employed in theoretical physics-- positive energy waves propagate forward in time. So just by making a sign change, you are making a change in the convention. I would have mailed this to you personally but since you have called attention to what you perceive is an error over this forum, I felt that the record has to be set straight over the same forum. -- John bitnet: davis@ohstpy internet: davis@pacific.mps.ohio-state.edu