Hackem
06-14-2006, 06:22 AM
Hello all,
After many hours of letting the code in the book run through a debugger, so I could see what was happening, I figured out what is going on. However I still have two questions:
1) The calculation of W^k uses only sin(as opposed to cos, sin and k ) and then scales w, with w*wp and shifts it with the addition of the current w, to get the new value. I assume that that is an application of a trig identity and the periodocity of sin and cos. Can some shed a little light on what exactly is going on?
2) The other question is the line: data[j] = data[i] - temp; the following line data[i] += temp; is simply the application of F^eee + W^k*F^eeo(the merging of two sub intervals into one interval.)
But what is the purpose of: data[j] = data[i] - temp;?
Any help would be greatly appriciated. Thank you in advance, B.
After many hours of letting the code in the book run through a debugger, so I could see what was happening, I figured out what is going on. However I still have two questions:
1) The calculation of W^k uses only sin(as opposed to cos, sin and k ) and then scales w, with w*wp and shifts it with the addition of the current w, to get the new value. I assume that that is an application of a trig identity and the periodocity of sin and cos. Can some shed a little light on what exactly is going on?
2) The other question is the line: data[j] = data[i] - temp; the following line data[i] += temp; is simply the application of F^eee + W^k*F^eeo(the merging of two sub intervals into one interval.)
But what is the purpose of: data[j] = data[i] - temp;?
Any help would be greatly appriciated. Thank you in advance, B.