Demonstratably wrong output from realft, fourn, or rlft3, in C or Fortran 77
|
|
|
Question / Problem
|
Symptom:
The routine runs on a small test example and gives demonstratably wrong output (often associated with the first or last components of input).
|
Solution
|
Solution:
No, there are not bugs in these routines. By now they have been thoroughly tested by many thousands of users over many years.
For C users, a common problem is attempting to use the routines with arrays declared using native C declarations, rather than using the required Numerical Recipes allocation utilities.
For both C and Fortran users, the other common problem is not reading the book carefully, to understand how the input and output arrays are packed. The Fourier routines are particularly tricky and unforgiving on this.
|
Applies to |
|
C
|
Rank It |
|