How to implement Complex exponential functions in C ???

Anisha84's Avatar, Join Date: Apr 2007
Newbie Member
Hi everyone

I am trying to write a code for an IIR filter. And for that purpose i need to implement the below funtion in C :-

out[n] = in[n] - ((b1 * e^jw * out[n-1]) + (b2 * e^2jw * out[n-2]))
Now, am facing problem ... wel rather i have no idea , as to how to implement the e^jw function. The value of w is known to me and n = the sample number.

It would be great if anyone could help me out.
Thanks a lot !!
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Post the code you have tried so far, that'll make it easier for people to help you.