Numerical Recipes: Error in Chapter 12?

John E. Davis davis at pacific.mps.ohio-state.edu
Wed Mar 6 15:51:47 AEST 1991


In article <11617 at pasteur.Berkeley.EDU> splin at 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 at ohstpy
internet: davis at pacific.mps.ohio-state.edu



More information about the Comp.lang.c mailing list