How can I use Keil to compute exponential function? is use #include <stdlib.h>? thank you sir.
In basic, I must include complex.h to compute complex number but I cant't #include <complex.h> on Keil Does keil has complex.h library?. yes, it does -->> Why my program error No,it doesn't -->> How can I compute complex number with KEIL?. I need to use Keil to compute complex number because it can implement on 8051. It's some part of my senior project. sincerely yours pattaraporn
The complete Keil library is described in the C51 Manual. Here it is: http://www.keil.com/support/man/docs/c51/c51_library.htm
I can't found library about complex number. Can you more advise me?.
I'm not found library for complex number. can you more advise me?
You're a Senior student - you should know by now how to use the research facilities available to you! * Have you checked your college library? * What does Google say?
8051 is not intended for complex calculations. Thinking to do complex calc on 8051 is almost futile. - Neo
I wouldn't go as far as to say, "futile".
Quite likely, you'll have to put together your own structures and functions to deal with complex numbers. Most applications for '51 MCUs don't involve heavy maths stuff because the processor neither has the RAM, ROM or CPU power to handle general purpose complex number libraries and the like efficiently. You will have to determine _what exactly_ you need to do that involves complex numbers, and then implement it. Alternatively, considering if and how to avoid the use of complex numbers could also be an option.
I wouldn't go as far as to say, "futile". Agreed, it can be done. To test the result, start the calculation when you leave work and hope the result has been calculated when you arrive in the morning :) Erik
thank you for your suggestion very much, I need to calc complex number on 8051 because of I have to calc FFT. Also,I will try to produce my own function to calc complex no. thank you very much. I will ask you when I can solve this proble. (^_^) pattaraporn
I need to calc complex number on 8051 because of I have to calc FFT. Actually, you don't. Using the exponential notation in frequency analysis is merely a convenient way to pack a sine and a cosine function into a single expression. The only complex operations necessary are addition/subtraction and multiplication, which are trivial to implement. If you're using anything like calls to exponential or trigonometric library functions (instead of just using a lookup table), you're essentially doing the exact opposite of a Fast Fourier Transform, because the resulting code will run very slowly.
http://en.wikipedia.org/wiki/Cooley-Tukey_FFT_algorithm http://www.fftw.org/
I need to calc complex number on 8051 because of I have to calc FFT. Says who? Who decided that an 8051 was an appropriate choice of processor to run an FFT on? Is that person generally crazy, or did (s)he just want to make you miserable in this particular case? That said, no, you don't need complex numbers to implement an FFT. They're convenient to use if you have them, but they're quite definitely not worth the hassle of implementing them from scratch just to use them in an FFT. Morale: you'll want to learn a lot more about 8051's, C and FFT before you go anywhere near implementing this.
Is that person generally crazy, or did (s)he just want to make you miserable in this particular case? Maybe it is a special, hidden kind of test for the students. Will they realize that their target hardware is not suited for the task, or will they not ?
This tech note might be of interest. Though it's not for an 8051, it is for a low-powered 16-bit micro without floating point hardware. http://www.maxim-ic.com/appnotes.cfm/appnote_number/3722
"Will they realize that their target hardware is not suited for the task" I wonder how the capability of an 8051 compares to the computing facilities available to Cooley & Tukey at the time of their 1965 paper...? Discuss.